code: function getPageRule (stylesheet) {
    var i, l = stylesheet.cssRules.length;
  
    for (i = 0; i < l; ++i) {
      if (stylesheet.cssRules[i] instanceof window.CSSPageRule) {
        return stylesheet.cssRules[i];
      }
    }
  }
docs: Locates the CSS @page rule