88[ ![ Backers] [ backers-badge ]] [ collective ]
99[ ![ Chat] [ chat-badge ]] [ chat ]
1010
11- [ hast] [ ] utility to check if a node is [ * embedded* ] [ spec ] .
11+ [ hast] [ ] utility to check if a node is [ * embedded content * ] [ spec ] .
1212
1313## Contents
1414
1717* [ Install] ( #install )
1818* [ Use] ( #use )
1919* [ API] ( #api )
20- * [ ` embedded(node ) ` ] ( #embeddednode )
20+ * [ ` embedded(value ) ` ] ( #embeddedvalue )
2121* [ Types] ( #types )
2222* [ Compatibility] ( #compatibility )
2323* [ Security] ( #security )
@@ -38,7 +38,7 @@ looking for!
3838## Install
3939
4040This package is [ ESM only] [ esm ] .
41- In Node.js (version 12.20+, 14.14+, 16.0+, or 18 .0+), install with [ npm] [ ] :
41+ In Node.js (version 14.14+ and 16 .0+), install with [ npm] [ ] :
4242
4343``` sh
4444npm install hast-util-embedded
@@ -82,20 +82,24 @@ embedded({
8282
8383## API
8484
85- This package exports the following identifiers: ` embedded ` .
85+ This package exports the identifier [ ` embedded ` ] [ embedded ] .
8686There is no default export.
8787
88- ### ` embedded(node ) `
88+ ### ` embedded(value ) `
8989
90- Check if ` node ` is an [ * embedded* ] [ spec ] [ * element * ] [ element ] .
90+ Check if ` node ` is an [ * embedded content * ] [ spec ] .
9191
9292###### Parameters
9393
94- * ` node ` ([ ` Node ` ] [ node ] ) — node to check
94+ * ` value ` (` unknown ` )
95+ — thing to check (typically [ ` Node ` ] [ node ] )
9596
9697###### Returns
9798
98- Whether ` node ` is embedded content (` boolean ` ).
99+ Whether ` value ` is an element considered embedded content (` boolean ` ).
100+
101+ The elements ` audio ` , ` canvas ` , ` embed ` , ` iframe ` , ` img ` , ` math ` ,
102+ ` object ` , ` picture ` , ` svg ` , and ` video ` are embedded content.
99103
100104## Types
101105
@@ -106,7 +110,7 @@ It exports no additional types.
106110
107111Projects maintained by the unified collective are compatible with all maintained
108112versions of Node.js.
109- As of now, that is Node.js 12.20+, 14.14+, 16.0+, and 18 .0+.
113+ As of now, that is Node.js 14.14+ and 16 .0+.
110114Our projects sometimes work with older versions, but this is not guaranteed.
111115
112116## Security
@@ -215,6 +219,6 @@ abide by its terms.
215219
216220[ node ] : https://github.com/syntax-tree/hast#nodes
217221
218- [ element ] : https://github.com/syntax-tree/hast#element
219-
220222[ xss ] : https://en.wikipedia.org/wiki/Cross-site_scripting
223+
224+ [ embedded ] : #embeddedvalue
0 commit comments