UNPKG

887 BJavaScriptView Raw
1//.CommonJS
2var CSSOM = {};
3///CommonJS
4
5
6/**
7 * @constructor
8 * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue
9 *
10 * TODO: add if needed
11 */
12CSSOM.CSSValue = function CSSValue() {
13};
14
15CSSOM.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//.CommonJS
42exports.CSSValue = CSSOM.CSSValue;
43///CommonJS