|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
1.1 KB
|
| Rev | Line | |
|---|
| [9af201e] | 1 | //.CommonJS
|
|---|
| 2 | var CSSOM = {
|
|---|
| 3 | CSSRule: require("./CSSRule").CSSRule,
|
|---|
| 4 | MatcherList: require("./MatcherList").MatcherList
|
|---|
| 5 | };
|
|---|
| 6 | ///CommonJS
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 | /**
|
|---|
| 10 | * @constructor
|
|---|
| 11 | * @see https://developer.mozilla.org/en/CSS/@-moz-document
|
|---|
| 12 | */
|
|---|
| 13 | CSSOM.CSSDocumentRule = function CSSDocumentRule() {
|
|---|
| 14 | CSSOM.CSSRule.call(this);
|
|---|
| 15 | this.matcher = new CSSOM.MatcherList();
|
|---|
| 16 | this.cssRules = [];
|
|---|
| 17 | };
|
|---|
| 18 |
|
|---|
| 19 | CSSOM.CSSDocumentRule.prototype = new CSSOM.CSSRule();
|
|---|
| 20 | CSSOM.CSSDocumentRule.prototype.constructor = CSSOM.CSSDocumentRule;
|
|---|
| 21 | CSSOM.CSSDocumentRule.prototype.type = 10;
|
|---|
| 22 | //FIXME
|
|---|
| 23 | //CSSOM.CSSDocumentRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule;
|
|---|
| 24 | //CSSOM.CSSDocumentRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule;
|
|---|
| 25 |
|
|---|
| 26 | Object.defineProperty(CSSOM.CSSDocumentRule.prototype, "cssText", {
|
|---|
| 27 | get: function() {
|
|---|
| 28 | var cssTexts = [];
|
|---|
| 29 | for (var i=0, length=this.cssRules.length; i < length; i++) {
|
|---|
| 30 | cssTexts.push(this.cssRules[i].cssText);
|
|---|
| 31 | }
|
|---|
| 32 | return "@-moz-document " + this.matcher.matcherText + " {" + cssTexts.join("") + "}";
|
|---|
| 33 | }
|
|---|
| 34 | });
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 | //.CommonJS
|
|---|
| 38 | exports.CSSDocumentRule = CSSOM.CSSDocumentRule;
|
|---|
| 39 | ///CommonJS
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.