CSSRuleList.js 557 B

1234567891011121314151617181920212223242526
  1. //.CommonJS
  2. var CSSOM = {};
  3. ///CommonJS
  4. /**
  5. * @constructor
  6. * @see https://drafts.csswg.org/cssom/#the-cssrulelist-interface
  7. */
  8. CSSOM.CSSRuleList = function CSSRuleList(){
  9. var arr = new Array();
  10. Object.setPrototypeOf(arr, CSSOM.CSSRuleList.prototype);
  11. return arr;
  12. };
  13. CSSOM.CSSRuleList.prototype = Object.create(Array.prototype);
  14. CSSOM.CSSRuleList.prototype.constructor = CSSOM.CSSRuleList;
  15. CSSOM.CSSRuleList.prototype.item = function(index) {
  16. return this[index] || null;
  17. };
  18. //.CommonJS
  19. exports.CSSRuleList = CSSOM.CSSRuleList;
  20. ///CommonJS