Javascript Reference
Categories: cssRule

javascript cssRule readOnly

@March 15, 2008, 1:22 a.m.
readOnlyFirefox/Netscape/NN n/a IE 5 Chrome/Safari/DOM n/a  

Read-only  

Returns Boolean true for rules that arrive to a document via an @import rule or a link element. Such rules may not be modified by script, although an element governed by such a rule can have individual style properties modified because the modifications are made to the element's own style property, and not the rule object.

 
Example
 
if (!document.styleSheets[2].cssRules[0].readOnly) {
    // not read-only, so OK to modify here
}
 
Value

Boolean value: true | false.

 
Default

Varies with rule type.


Powered by Linode.