Skip to content

Commit

Permalink
📝 add/remove api
Browse files Browse the repository at this point in the history
  • Loading branch information
taoqf committed Feb 6, 2020
1 parent 95d31ca commit d1647e7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,30 +134,30 @@ Get first child node

Get last child node

### HTMLElement#attributes
### HTMLElement#setAttribute(key: string, value: string)

Get attributes
Set `value` to `key` attribute.

### HTMLElement#rawAttributes
### HTMLElement#removeAttribute(key: string)

Get escaped (as-it) attributes
Remove `key` attribute.

### HTMLElement#setAttribute(key: string, value: string | null)
### HTMLElement#getAttribute(key: string)

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.
Get `key` attrubte.

### HTMLElement#toString()

Same as [outerHTML](#htmlelementouterhtml)

### HTMLElement#innerHTML

Get innerHTML.

### HTMLElement#outerHTML

Get outerHTML.

### HTMLElement#set_content(content: string | Node | Node[])

Set content. **Notice**: Do not set content of the **root** node.

0 comments on commit d1647e7

Please sign in to comment.