This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!('requestClose' in HTMLDialogElement.prototype)) { | |
HTMLDialogElement.prototype.requestClose = function (returnValue) { | |
if (!this.open) | |
return; | |
if (this.dispatchEvent(new Event('cancel', {cancelable: true}))) | |
this.close(returnValue); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grammar WebIDL; | |
Integer: '-'?( [1-9] [0-9]*|'0'[Xx] [0-9A-Fa-f]+|'0'[0-7]*); | |
Decimal: '-'?(([0-9]+'.'[0-9]*|[0-9]*'.'[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+); | |
Identifier: [_-]?[A-Za-z][0-9A-Z_a-z-]*; | |
String: '"'[^"]*'"'; | |
Whitespace: [\t\n\r ]+ -> skip; | |
Comment: ('/*' .*? '*/' | '//' ~ [\n]*) -> skip; | |
Other: [^\t\n\r 0-9A-Za-z]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/lukewarlow/GoConsoleMenu" | |
"fmt" | |
) | |
func main() { | |
subMenu := GoConsoleMenu.NewMenu("Welcome to the test sub menu") | |
subMenu.AddMenuItem(GoConsoleMenu.NewActionItem(0, "Exit current menu", func() {}).SetAsExitOption()) |