File tree 2 files changed +22
-1
lines changed
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) {
197
197
}
198
198
199
199
if ( tagName === 'button' ) {
200
- return type !== 'submit' && type !== 'reset' && type !== 'button' ;
200
+ return type !== 'menu' &&
201
+ type !== 'submit' &&
202
+ type !== 'reset' &&
203
+ type !== 'button' ;
201
204
}
202
205
203
206
return 'value' in value ;
Original file line number Diff line number Diff line change @@ -728,6 +728,24 @@ test('hastscript', function (t) {
728
728
'a button has a valid type'
729
729
) ;
730
730
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
+
731
749
st . deepEqual (
732
750
h ( 'button' , {
733
751
'type' : 'text' ,
You can’t perform that action at this time.
0 commit comments