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  


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.

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

Boolean value: true | false.


Varies with rule type.

Powered by Linode.