This commit is contained in:
taoqiufeng 2017-06-14 16:02:24 +08:00
parent e492fec12b
commit ebe0f0f001
2 changed files with 11 additions and 11 deletions

View file

@ -53,6 +53,8 @@ console.log(root.querySelector('#list'));
// classNames: [] } ],
// id: 'list',
// classNames: [] }
console.log(root.toString());
// <ul id="list"><li>Hello World</li></ul>
```
## API
@ -130,3 +132,12 @@ Get attributes
### HTMLElement#rawAttributes
Get escaped (as-it) attributes
### HTMLElement#toString()
Same as [outerHTML](#htmlelementouterhtml)
### HTMLElement#innerHTML
Get innerHTML.
### HTMLElement#outerHTML
Get outerHTML.

11
t.html
View file

@ -1,11 +0,0 @@
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
</body>
</html>