StyleSheet.addImport() (Method)

A method for importing to style sheets.

Availability:

JScript - 3.0
Internet Explorer - 4.0
JavaScript syntax:IEmyStyleSheet.addImport(aUrl)
IEmyStyleSheet.addImport(aUrl, anIndex)
Argument list:anIndexAn index position within the collection where the new style sheet should be inserted
aUrlA URL value that points at a CSS document

This method provides a way to import an external style sheet so its rules become part of the current style sheet.

This is another example of how to build a document hierarchy in a web browser.

If you omit the index location for the style sheet that is being imported, it will be appended to the end of the current collection of style sheets belonging to the document.

See also:Hierarchy of objects