1 |
|
2 | var CSSOM = {};
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | CSSOM.CSSValue = function CSSValue() {
|
13 | };
|
14 |
|
15 | CSSOM.CSSValue.prototype = {
|
16 | constructor: CSSOM.CSSValue,
|
17 |
|
18 | // @see: http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue
|
19 | set cssText(text) {
|
20 | var name = this._getConstructorName();
|
21 |
|
22 | throw new Error('DOMException: property "cssText" of "' + name + '" is readonly and can not be replaced with "' + text + '"!');
|
23 | },
|
24 |
|
25 | get cssText() {
|
26 | var name = this._getConstructorName();
|
27 |
|
28 | throw new Error('getter "cssText" of "' + name + '" is not implemented!');
|
29 | },
|
30 |
|
31 | _getConstructorName: function() {
|
32 | var s = this.constructor.toString(),
|
33 | c = s.match(/function\s([^\(]+)/),
|
34 | name = c[1];
|
35 |
|
36 | return name;
|
37 | }
|
38 | };
|
39 |
|
40 |
|
41 |
|
42 | exports.CSSValue = CSSOM.CSSValue;
|
43 |
|