File tree 2 files changed +29
-1
lines changed
2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 35
35
"@types/hast" : " ^3.0.0" ,
36
36
"@types/unist" : " ^3.0.0" ,
37
37
"devlop" : " ^1.0.0" ,
38
- "hastscript" : " ^8 .0.0" ,
38
+ "hastscript" : " ^9 .0.0" ,
39
39
"property-information" : " ^6.0.0" ,
40
40
"vfile" : " ^6.0.0" ,
41
41
"vfile-location" : " ^5.0.0" ,
Original file line number Diff line number Diff line change @@ -245,6 +245,34 @@ test('fromParse5', async function (t) {
245
245
}
246
246
)
247
247
} )
248
+
249
+ await t . test ( 'should handle unknown attributes' , async function ( ) {
250
+ assert . deepEqual (
251
+ fromParse5 ( parseFragment ( '<button type="other" disabled>Hello</button>' ) ) ,
252
+ {
253
+ type : 'root' ,
254
+ children : [
255
+ {
256
+ type : 'element' ,
257
+ tagName : 'button' ,
258
+ properties : {
259
+ type : 'other' ,
260
+ disabled : true
261
+ } ,
262
+ children : [
263
+ {
264
+ type : 'text' ,
265
+ value : 'Hello'
266
+ }
267
+ ]
268
+ }
269
+ ] ,
270
+ data : {
271
+ quirksMode : false
272
+ }
273
+ }
274
+ )
275
+ } )
248
276
} )
249
277
250
278
test ( 'fixtures' , async function ( t ) {
You can’t perform that action at this time.
0 commit comments