goog.cssom.iframe.style
Functions
getBackgroundContext( element ) → Object
Object
Generates a set of CSS properties that can be used to make another element's background look like the background of a given element. This is useful when you want to copy the CSS context of an element, but the element's background is transparent. In the original context you would see the ancestor's backround color/image showing through, but in the new context there might be a something different underneath. Note that this assumes the element you're copying context from has a fairly standard positioning/layout - it assumes that when the element has a transparent background what you're going to see through it is its ancestors.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
getElementContext( element, opt_forceRuleSetCacheUpdate, opt_copyBackgroundContext ) → string
string
Reads the current css rules from element's document, and returns them rewriting selectors so that any rules that formerly applied to element will be applied to doc.body. This makes it possible to replace a block in a page with an iframe and preserve the css styling of the contents.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
| ||||||||||||
See Also | goog.cssom.iframe.style.getBackgroundContext. |
resetDomCache() → void
void
Throw away all cached dom information. Call this if you've modified the structure or class/id attributes of your document and you want to recalculate the currently applied CSS rules.