happy-dom
Version:
Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. It includes many web standards from WHATWG DOM and HTML.
76 lines • 2.2 kB
TypeScript
/**
* Utility for encoding.
*/
export default class XMLEncodeUtility {
/**
* Encodes attribute value.
*
* @param value Value.
* @returns Escaped value.
*/
static encodeXMLAttributeValue(value: string | null): string;
/**
* Decodes attribute value.
*
* Uses the 'entities' library for comprehensive XML character reference support.
*
* @param value Value.
* @returns Decoded value.
*/
static decodeXMLAttributeValue(value: string | null): string;
/**
* Encodes attribute value.
*
* @param value Value.
* @returns Escaped value.
*/
static encodeHTMLAttributeValue(value: string | null): string;
/**
* Decodes attribute value.
*
* Uses the 'entities' library for comprehensive HTML5 character reference support,
* including named entities, decimal numeric references ("), and
* hexadecimal numeric references (").
*
* @param value Value.
* @returns Decoded value.
*/
static decodeHTMLAttributeValue(value: string | null): string;
/**
* Encodes text content.
*
* Uses the 'entities' library which follows the WHATWG HTML serialization spec.
* Encodes &, <, >, and non-breaking space.
*
* @param text Value.
* @returns Escaped value.
*/
static encodeTextContent(text: string | null): string;
/**
* Decodes text content.
*
* @param text Value.
* @returns Decoded value.
*/
static decodeTextContent(text: string | null): string;
/**
* Decodes HTML entities.
*
* Uses the 'entities' library for comprehensive HTML5 named character reference support.
*
* @param value Value.
* @returns Decoded value.
*/
static decodeHTMLEntities(value: string): string;
/**
* Decodes XML entities.
*
* Uses the 'entities' library for comprehensive XML character reference support,
* including named entities and numeric references.
*
* @param value Value.
* @returns Decoded value.
*/
static decodeXMLEntities(value: string): string;
}
//# sourceMappingURL=XMLEncodeUtility.d.ts.map