Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 399867 of CSSPageRule

  • Revision slug: Web/API/CSSPageRule
  • Revision title: CSSPageRule
  • Revision id: 399867
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment DOM/CSSPageRule Web/API/CSSPageRule

Revision Content

{{ CSSOMRef() }}

CSSPageRule is an object representing a single CSS {{cssxref("@page")}} rule. It implements the {{domxref("CSSRule")}} interface with a type value of 6 (CSSRule.PAGE_RULE).

Syntax

The syntax is described using the WebIDL format.

interface CSSPageRule : CSSRule {
    attribute DOMString selectorText;
    readonly attribute CSSStyleDeclaration style;
};

Properties

As a {{ domxref("CSSRule") }}, CSSPageRule also implements the properties of these interfaces. It has the following specific property:

selectorText
Represents the text of the page selector associated with the at-rule.
style {{readonlyinline()}}
Returns the declaration block associated with the at-rule.

Methods

As a {{ domxref("CSSRule") }}, CSSPageRule also implements the methods of that interface. It has no specific methods.

Specification

Specification Status Comment
{{ SpecName('CSSOM', '#the-csspagerule-interface', 'CSSPageRule') }} {{ Spec2('CSSOM') }} No changes from {{SpecName('DOM2 Style')}}
{{SpecName('DOM2 Style', 'css.html#CSS-CSSPageRule', 'CSSPageRule') }} {{ Spec2('DOM2 Style') }}  

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{ CompatVersionUnknown }} {{ CompatGeckoDesktop("19") }} {{ CompatVersionUnknown }} {{ CompatVersionUnknown }} {{ CompatVersionUnknown }}
selectorText {{ CompatVersionUnknown }} {{CompatNo}} {{ CompatVersionUnknown }} {{ CompatVersionUnknown }} {{ CompatVersionUnknown }}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{ CompatUnknown() }} {{ CompatGeckoMobile("19") }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}
selectorText {{ CompatUnknown() }} {{CompatNo}} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}

See also

  • {{CSSOM}}

Revision Source

<p>{{ CSSOMRef() }}</p>
<p><strong><code>CSSPageRule</code></strong> is an object representing a single CSS {{cssxref("@page")}} rule. It implements the {{domxref("CSSRule")}} interface with a type value of <code>6</code> (<code>CSSRule.PAGE_RULE</code>).</p>
<h2 id="Syntax">Syntax</h2>
<p>The syntax is described using the <a href="https://dev.w3.org/2006/webapi/WebIDL/" title="https://dev.w3.org/2006/webapi/WebIDL/">WebIDL</a> format.</p>
<pre>
interface CSSPageRule : CSSRule {
&nbsp;&nbsp;&nbsp; attribute DOMString selectorText;
&nbsp;&nbsp;&nbsp; readonly attribute CSSStyleDeclaration style;
};
</pre>
<h2 id="Properties" name="Properties">Properties</h2>
<p>As a {{ domxref("CSSRule") }}, <code>CSSPageRule</code> also implements the properties of these interfaces. It has the following specific propert<code>y:</code></p>
<dl>
  <dt>
    <code>selectorText</code></dt>
  <dd>
    Represents the text of the page selector associated with the at-rule.</dd>
  <dt>
    <code>style</code> {{readonlyinline()}}</dt>
  <dd>
    Returns the declaration block associated with the at-rule.</dd>
</dl>
<h2 id="Methods" name="Methods">Methods</h2>
<p>As a {{ domxref("CSSRule") }}, <code>CSSPageRule</code> also implements the methods of that interface. It has no specific methods.</p>
<h2 id="Specification" name="Specification">Specification</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>{{ SpecName('CSSOM', '#the-csspagerule-interface', 'CSSPageRule') }}</td>
      <td>{{ Spec2('CSSOM') }}</td>
      <td>No changes from {{SpecName('DOM2 Style')}}</td>
    </tr>
    <tr>
      <td>{{SpecName('DOM2 Style', 'css.html#CSS-CSSPageRule', 'CSSPageRule') }}</td>
      <td>{{ Spec2('DOM2 Style') }}</td>
      <td>&nbsp;</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari (WebKit)</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{ CompatVersionUnknown }}</td>
        <td>{{ CompatGeckoDesktop("19") }}</td>
        <td>{{ CompatVersionUnknown }}</td>
        <td>{{ CompatVersionUnknown }}</td>
        <td>{{ CompatVersionUnknown }}</td>
      </tr>
      <tr>
        <td><code>selectorText</code></td>
        <td>{{ CompatVersionUnknown }}</td>
        <td>{{CompatNo}}</td>
        <td>{{ CompatVersionUnknown }}</td>
        <td>{{ CompatVersionUnknown }}</td>
        <td>{{ CompatVersionUnknown }}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE&nbsp;Phone</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatGeckoMobile("19") }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
      </tr>
      <tr>
        <td><code>selectorText</code></td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{CompatNo}}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="See_also">See also</h2>
<ul>
  <li>{{CSSOM}}</li>
</ul>
Revert to this revision