Name

CSSCharsetRule — an @charset rule in a CSS style sheet

Availability

DOM Level 2 CSS

Inherits from/Overrides

CSSRule CSSCharsetRule

Properties

String encoding

The character encoding specified by the @charset rule. If you set this property to an illegal value, a DOMException with a code of SYNTAX_ERR is thrown. If the rule or style sheet is read-only, an attempt to set this property throws a DOMException with a code of NO_MODIFICATION_ALLOWED_ERR.

Description

This interface represents an @charset rule in a CSS style sheet. Consult a CSS reference for details.

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.