12
12
13
13
## Contents
14
14
15
- * [ What is this?] ( #what-is-this )
16
- * [ When should I use this?] ( #when-should-i-use-this )
17
- * [ Install] ( #install )
18
- * [ Use] ( #use )
19
- * [ API] ( #api )
20
- * [ ` fromDom(tree, options?) ` ] ( #fromdomtree-options )
21
- * [ ` AfterTransform ` ] ( #aftertransform )
22
- * [ ` Options ` ] ( #options )
23
- * [ Types] ( #types )
24
- * [ Compatibility] ( #compatibility )
25
- * [ Security] ( #security )
26
- * [ Contribute] ( #contribute )
27
- * [ Related] ( #related )
28
- * [ License] ( #license )
15
+ * [ What is this?] ( #what-is-this )
16
+ * [ When should I use this?] ( #when-should-i-use-this )
17
+ * [ Install] ( #install )
18
+ * [ Use] ( #use )
19
+ * [ API] ( #api )
20
+ * [ ` fromDom(tree, options?) ` ] ( #fromdomtree-options )
21
+ * [ ` AfterTransform ` ] ( #aftertransform )
22
+ * [ ` Options ` ] ( #options )
23
+ * [ Types] ( #types )
24
+ * [ Compatibility] ( #compatibility )
25
+ * [ Security] ( #security )
26
+ * [ Contribute] ( #contribute )
27
+ * [ Related] ( #related )
28
+ * [ License] ( #license )
29
29
30
30
## What is this?
31
31
@@ -38,9 +38,9 @@ syntax tree.
38
38
You can use this project when you want to use hast in browsers.
39
39
This package is very small, but it does so by:
40
40
41
- * …not providing positional information
42
- * …potentially yielding varying results in different (especially older)
43
- browsers
41
+ * …not providing positional information
42
+ * …potentially yielding varying results in different (especially older)
43
+ browsers
44
44
45
45
The hast utility [ ` hast-util-to-dom ` ] [ hast-util-to-dom ] does the inverse of this
46
46
utility.
@@ -110,10 +110,10 @@ Transform a DOM tree to a hast tree.
110
110
111
111
###### Parameters
112
112
113
- * ` tree ` ([ ` DomNode ` ] [ dom-node ] )
114
- — DOM tree to transform
115
- * ` options ` ([ ` Options ` ] [ api-options ] , optional)
116
- — configuration
113
+ * ` tree ` ([ ` DomNode ` ] [ dom-node ] )
114
+ — DOM tree to transform
115
+ * ` options ` ([ ` Options ` ] [ api-options ] , optional)
116
+ — configuration
117
117
118
118
###### Returns
119
119
@@ -125,10 +125,10 @@ Callback called when each node is transformed (TypeScript type).
125
125
126
126
###### Parameters
127
127
128
- * ` domNode ` ([ ` DomNode ` ] [ dom-node ] )
129
- — DOM node that was handled
130
- * ` hastNode ` ([ ` HastNode ` ] [ hast-node ] )
131
- — corresponding hast node
128
+ * ` domNode ` ([ ` DomNode ` ] [ dom-node ] )
129
+ — DOM node that was handled
130
+ * ` hastNode ` ([ ` HastNode ` ] [ hast-node ] )
131
+ — corresponding hast node
132
132
133
133
###### Returns
134
134
@@ -140,8 +140,8 @@ Configuration (TypeScript type).
140
140
141
141
##### Fields
142
142
143
- * ` afterTransform ` ([ ` AfterTransform ` ] [ api-after-transform ] , optional)
144
- — callback called when each node is transformed
143
+ * ` afterTransform ` ([ ` AfterTransform ` ] [ api-after-transform ] , optional)
144
+ — callback called when each node is transformed
145
145
146
146
##### Returns
147
147
@@ -180,14 +180,14 @@ abide by its terms.
180
180
181
181
## Related
182
182
183
- * [ ` hast-util-from-html ` ] [ hast-util-from-html ]
184
- — parse hast from a string of HTML
185
- * [ ` hast-util-sanitize ` ] ( https://github.com/syntax-tree/hast-util-sanitize )
186
- — sanitize hast nodes
187
- * [ ` hast-util-to-html ` ] ( https://github.com/syntax-tree/hast-util-to-html )
188
- — serialize hast as HTML
189
- * [ ` hast-util-to-dom ` ] ( https://github.com/syntax-tree/hast-util-to-dom )
190
- — create DOM trees from hast
183
+ * [ ` hast-util-from-html ` ] [ hast-util-from-html ]
184
+ — parse hast from a string of HTML
185
+ * [ ` hast-util-sanitize ` ] ( https://github.com/syntax-tree/hast-util-sanitize )
186
+ — sanitize hast nodes
187
+ * [ ` hast-util-to-html ` ] ( https://github.com/syntax-tree/hast-util-to-html )
188
+ — serialize hast as HTML
189
+ * [ ` hast-util-to-dom ` ] ( https://github.com/syntax-tree/hast-util-to-dom )
190
+ — create DOM trees from hast
191
191
192
192
## License
193
193
0 commit comments