aboutsummaryrefslogtreecommitdiffstats
path: root/vanilla/node_modules/@acemir/cssom/lib/StyleSheet.js
blob: 19144003aa6af5c09cdb446ec07fa5cad55dfc3a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//.CommonJS
var CSSOM = {
	MediaList: require("./MediaList").MediaList
};
///CommonJS


/**
 * @see http://dev.w3.org/csswg/cssom/#the-stylesheet-interface
 */
CSSOM.StyleSheet = function StyleSheet() {
	this.__href = null;
	this.__ownerNode = null;
	this.__title = null;
	this.__media = new CSSOM.MediaList();
	this.__parentStyleSheet = null;
	this.disabled = false;
};

Object.defineProperties(CSSOM.StyleSheet.prototype, {
	type: {
		get: function() {
			return "text/css";
		}
	},
	href: {
		get: function() {
			return this.__href;
		}
	},
	ownerNode: {
		get: function() {
			return this.__ownerNode;
		}
	},
	title: {
		get: function() {
			return this.__title;
		}
	},
	media: {
		get: function() {
			return this.__media;
		},
		set: function(value) {
			if (typeof value === "string") {
				this.__media.mediaText = value;
			} else {
				this.__media = value;
			}
		}
	},
	parentStyleSheet: {
		get: function() {
			return this.__parentStyleSheet;
		}
	}
});

//.CommonJS
exports.StyleSheet = CSSOM.StyleSheet;
///CommonJS