File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 3535 "@types/hast" : " ^3.0.0" ,
3636 "@types/unist" : " ^3.0.0" ,
3737 "devlop" : " ^1.0.0" ,
38- "hastscript" : " ^8 .0.0" ,
38+ "hastscript" : " ^9 .0.0" ,
3939 "property-information" : " ^6.0.0" ,
4040 "vfile" : " ^6.0.0" ,
4141 "vfile-location" : " ^5.0.0" ,
Original file line number Diff line number Diff line change @@ -245,6 +245,34 @@ test('fromParse5', async function (t) {
245245 }
246246 )
247247 } )
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+ } )
248276} )
249277
250278test ( 'fixtures' , async function ( t ) {
You can’t perform that action at this time.
0 commit comments