This page is Almost Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

addImport

Summary

Non standard. Adds an @import rule to the style sheet.

Method of css/cssom/styleSheetcss/cssom/styleSheet

Syntax

var index = stylesheet.addImport(/* see parameter list */);

Parameters

url

Data-type
String

The location of the source file for the style sheet.

index

Data-type
Number

(Optional)

The requested position for the style sheet in the collection. If this value is not given, the style sheet is added to the end of the collection.

Return Value

Returns an object of type NumberNumber

A zero-based index value indicating the position of the imported style sheet in the imports collection.

See also

Related articles

CSSOM

Related pages

Attributions