Javascript [Electronic resources] : The Definitive Guide (4th Edition)

David Flanagan

نسخه متنی -صفحه : 844/ 556
نمايش فراداده

Availability

DOM Level 2 CSS

Synopsis

void deleteRule(unsigned long index) throws DOMException;

Arguments

index

The position within the @media rule block of the rule to be deleted.

Throws

This method throws a DOMException with one of the following code values in the following circumstances:

INDEX_SIZE_ERR

index is negative or is greater than or equal to the number of rules in cssRules.

NO_MODIFICATION_ALLOWED_ERR

The rule is read-only.

Description

This method deletes the rule at the specified position in the cssRules array.