Fixed call of popup menu commands with parameters.s

This commit is contained in:
2020-08-04 18:07:48 +02:00
parent 47b178fbc1
commit 12b17fd7af
3 changed files with 12 additions and 8 deletions
+2 -2
View File
@@ -34,8 +34,8 @@ oncontextmenu="PopupMenu.open(cmds,
oncontextmenu="PopupMenu.open(cmds, {x: event.offsetX, y: event.offsetY}, { parent: example, keepWithin: example}); return false;"></div>
<script class="doctest">
let cmds = {
"Start": () => alert("Start"),
"Stop": () => alert("Stop")
"Start": (event, key) => {console.log("start", event, key); alert(key) },
"Stop": (event, key) => alert(key)
}
let app = new App()
let popup = new PopupMenu({ parent: example, fontSize: "2em", autoClose: false })