From 730559387b7e53cf35dd2d3143e084254d3d84dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20BILLIOUD?= Date: Thu, 30 Jan 2020 06:44:44 +0100 Subject: [PATCH] Update documentation for attributes modification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: François BILLIOUD --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 8f5b5ec..1a966f5 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,14 @@ Get attributes Get escaped (as-it) attributes +### HTMLElement#setAttribute(key: string, value: string | null) + +Set `value` to `key` attribute. If `value` is null, remove the attribute instead. + +### HTMLElement#setAttributes(attributes: Attributes) + +Replace all the current attributes by the provided attribute set. + ### HTMLElement#toString() Same as [outerHTML](#htmlelementouterhtml) @@ -150,5 +158,6 @@ Get innerHTML. ### HTMLElement#outerHTML Get outerHTML. + ### HTMLElement#set_content(content: string | Node | Node[]) Set content. **Notice**: Do not set content of the **root** node.