File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,10 @@ function isNode(tagName, value) {
197197 }
198198
199199 if ( tagName === 'button' ) {
200- return type !== 'submit' && type !== 'reset' && type !== 'button' ;
200+ return type !== 'menu' &&
201+ type !== 'submit' &&
202+ type !== 'reset' &&
203+ type !== 'button' ;
201204 }
202205
203206 return 'value' in value ;
Original file line number Diff line number Diff line change @@ -728,6 +728,24 @@ test('hastscript', function (t) {
728728 'a button has a valid type'
729729 ) ;
730730
731+ st . deepEqual (
732+ h ( 'button' , {
733+ 'type' : 'menu' ,
734+ 'value' : 'Send'
735+ } ) ,
736+ {
737+ 'type' : 'element' ,
738+ 'tagName' : 'button' ,
739+ 'properties' : {
740+ 'type' : 'menu' ,
741+ 'value' : 'Send'
742+ } ,
743+ 'children' : [ ]
744+ } ,
745+ 'should *not* allow omitting `properties` when ' +
746+ 'a button has a valid type'
747+ ) ;
748+
731749 st . deepEqual (
732750 h ( 'button' , {
733751 'type' : 'text' ,
You can’t perform that action at this time.
0 commit comments