Name
CSSMediaRule.deleteRule( ) — delete a rule in an @media block
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 incssRules
.-
NO_MODIFICATION_ALLOWED_ERR
The rule is read-only.
Description
This method deletes the rule at the specified position in the
cssRules
array.
Get JavaScript: The Definitive Guide, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.