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 900943 of CSSPageRule

  • Revision slug: Web/API/CSSPageRule
  • Revision title: CSSPageRule
  • Revision id: 900943
  • Created:
  • Creator: jpmedley
  • Is current revision? No
  • Comment

Revision Content

{{ APIRef("CSSOM") }}

Summary

CSSPageRule is an interface 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 this interface. It has the following specific properties:

{{domxref("CSSPageRule.selectorText")}}
Represents the text of the page selector associated with the at-rule.
{{domxref("CSSPageRule.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.

Specifications

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 {{ CompatChrome(45.0) }} {{ CompatGeckoDesktop("19") }} {{ CompatVersionUnknown }} {{ CompatVersionUnknown }} {{ CompatVersionUnknown }}
selectorText {{ CompatVersionUnknown }} {{CompatNo}} {{ CompatVersionUnknown }} {{ CompatVersionUnknown }} {{ CompatVersionUnknown }}
Feature Android Android Webview Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile Chrome for Android
Basic support {{ CompatUnknown() }} {{ CompatChrome(45.0) }} {{ CompatGeckoMobile("19") }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatChrome(45.0) }}
selectorText {{ CompatUnknown() }} {{ CompatUnknown() }} {{CompatNo}} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}

See also

  • {{CSSOM}}

Revision Source

<p>{{ APIRef("CSSOM") }}</p>

<h2 id="Summary">Summary</h2>

<p><strong><code>CSSPageRule</code></strong> is an interface 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 this interface. It has the following specific properties:</p>

<dl>
 <dt>{{domxref("CSSPageRule.selectorText")}}</dt>
 <dd>Represents the text of the page selector associated with the at-rule.</dd>
 <dt>{{domxref("CSSPageRule.style")}} {{readonlyinline()}}</dt>
 <dd>Returns the declaration block associated with the at-rule.</dd>
</dl>

<h2 id="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="Specifications">Specifications</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>{{ CompatChrome(45.0) }}</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>Android Webview</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE&nbsp;Phone</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
   <th>Chrome for Android</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{ CompatUnknown() }}</td>
   <td>{{ CompatChrome(45.0) }}</td>
   <td>{{ CompatGeckoMobile("19") }}</td>
   <td>{{ CompatUnknown() }}</td>
   <td>{{ CompatUnknown() }}</td>
   <td>{{ CompatUnknown() }}</td>
   <td>{{ CompatChrome(45.0) }}</td>
  </tr>
  <tr>
   <td><code>selectorText</code></td>
   <td>{{ CompatUnknown() }}</td>
   <td>{{ CompatUnknown() }}</td>
   <td>{{CompatNo}}</td>
   <td>{{ CompatUnknown() }}</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