The goog.cssom.iframe.style.CssRuleSet_ Class

.clone()

Make a copy of this ruleset.

returns {goog.cssom.iframe.style.CssRuleSet_}
A new CssRuleSet containing the same data as this one.

.declarationText {string}

Text of the declarations inside the rule set. For example: 'font-family: Arial; color: red;'

.initializeFromCssRule(cssRule)

Initializes the rule set from a {@code CSSRule}.

cssRule {CSSRule}
The {@code CSSRule} to initialize from.
returns {boolean}
True if initialization succeeded. We only support {@code CSSStyleRule} and {@code CSSFontFaceRule} objects.

.selectors {Array.<goog.cssom.iframe.style.CssSelector_>}

Array of CssSelector objects, one for each selector. Example: [h1, h2]

.setDeclarationTextFromObject(sourceObject, opt_important)

Set the declaration text with properties from a given object.

sourceObject {Object}
Object whose properties and values should be used to generate the declaration text.
opt_important {boolean=}
Whether !important should be added to each declaration.

.setSelectorsFromString(selectorsString)

Parses a selectors string (which may contain multiple comma-delimited selectors) and loads the results into this.selectors.

selectorsString {string}
String containing selectors.

.writeToArray(array)

Serializes this CssRuleSet_ into an array as a series of strings. The array can then be join()-ed to get a string representation of this ruleset.

array {Array.<string>}
The array to which to append strings.