2.5.2.1 addImport

addImport()

Used to add @import rule to the related CSSStyleSheet object.

Parameters

sURL of type DOMString

String that represents the location of the source file for the imported style sheet.

iIndex of type long

Optional. Ordinal index that specifies the requested position of the object in the collection. If this value is not supplied, or if the value is larger than the number of items in the collection, the @import rule is added to the end of the collection.

Return Value

Long     Returns the zero-based index position of the new imported style sheet.

No Errors

Show: