Javascript Reference
Categories: imports

javascript imports Description

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


A collection (array) of styleSheet objects imported into an explicit styleSheet object via the @import rule. In other words, a styleSheet object that employs an @import treats that imported style sheet as a nested object, but one that is, itself, a full-fledged styleSheet object. Thus, you can access the rule objects within each imported style sheet. The following example iterates through all of the document's styleSheet objects in search of imported style sheets:

for (var i = 0; i< document.styleSheets.length; i++) {
    for (var j = 0; j < document.styleSheets[i].imports.length; j++) {
        // process each imported style sheet, referenced
        // here as document.styleSheets[i].imports[j]
Object Model Reference
Object-Specific Properties


Object-Specific Methods

item( )

Powered by Linode.