1 |
|
2 | var CSSOM = {
|
3 | CSSRule: require("./CSSRule").CSSRule
|
4 | };
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | CSSOM.CSSHostRule = function CSSHostRule() {
|
13 | CSSOM.CSSRule.call(this);
|
14 | this.cssRules = [];
|
15 | };
|
16 |
|
17 | CSSOM.CSSHostRule.prototype = new CSSOM.CSSRule();
|
18 | CSSOM.CSSHostRule.prototype.constructor = CSSOM.CSSHostRule;
|
19 | CSSOM.CSSHostRule.prototype.type = 1001;
|
20 |
|
21 |
|
22 |
|
23 |
|
24 | Object.defineProperty(CSSOM.CSSHostRule.prototype, "cssText", {
|
25 | get: function() {
|
26 | var cssTexts = [];
|
27 | for (var i=0, length=this.cssRules.length; i < length; i++) {
|
28 | cssTexts.push(this.cssRules[i].cssText);
|
29 | }
|
30 | return "@host {" + cssTexts.join("") + "}";
|
31 | }
|
32 | });
|
33 |
|
34 |
|
35 |
|
36 | exports.CSSHostRule = CSSOM.CSSHostRule;
|
37 |
|