Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
81143 views
1
//.CommonJS
2
var CSSOM = {
3
CSSStyleDeclaration: require("./CSSStyleDeclaration").CSSStyleDeclaration,
4
CSSRule: require("./CSSRule").CSSRule
5
};
6
///CommonJS
7
8
9
/**
10
* @constructor
11
* @see http://dev.w3.org/csswg/cssom/#css-font-face-rule
12
*/
13
CSSOM.CSSFontFaceRule = function CSSFontFaceRule() {
14
CSSOM.CSSRule.call(this);
15
this.style = new CSSOM.CSSStyleDeclaration;
16
this.style.parentRule = this;
17
};
18
19
CSSOM.CSSFontFaceRule.prototype = new CSSOM.CSSRule;
20
CSSOM.CSSFontFaceRule.prototype.constructor = CSSOM.CSSFontFaceRule;
21
CSSOM.CSSFontFaceRule.prototype.type = 5;
22
//FIXME
23
//CSSOM.CSSFontFaceRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule;
24
//CSSOM.CSSFontFaceRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule;
25
26
// http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSFontFaceRule.cpp
27
Object.defineProperty(CSSOM.CSSFontFaceRule.prototype, "cssText", {
28
get: function() {
29
return "@font-face {" + this.style.cssText + "}";
30
}
31
});
32
33
34
//.CommonJS
35
exports.CSSFontFaceRule = CSSOM.CSSFontFaceRule;
36
///CommonJS
37
38