I started working on a start menu for the desktop with the intent of submitting a PR once it's complete. I have the look and functionality locked down except I can't figure out a way to launch programs by clicking on their respective menu item. I'm new to javascript so forgive me if it's an obvious answer.
I know that the functions for launching the program windows is in programs.js, so I'm assuming it's possible to create an onclick event that would trigger said functions? I tried tinkering around with it but I couldn't figure out how to make it happen. Any pointers?
programs.js: function Minesweeper(){ var $win = new $IframeWindow({ src: "programs/minesweeper/index.html", icon: "minesweeper", title: "Minesweeper", innerWidth: 280, innerHeight: 320 }); return new Task($win); }
index.html: <div class="start-menu-item" onclick="[insert calling of function Minesweeper here?]">Minesweeper</div>
I started working on a start menu for the desktop with the intent of submitting a PR once it's complete. I have the look and functionality locked down except I can't figure out a way to launch programs by clicking on their respective menu item. I'm new to javascript so forgive me if it's an obvious answer.
I know that the functions for launching the program windows is in programs.js, so I'm assuming it's possible to create an onclick event that would trigger said functions? I tried tinkering around with it but I couldn't figure out how to make it happen. Any pointers?
programs.js:
function Minesweeper(){ var $win = new $IframeWindow({ src: "programs/minesweeper/index.html", icon: "minesweeper", title: "Minesweeper", innerWidth: 280, innerHeight: 320 }); return new Task($win); }
index.html:
<div class="start-menu-item" onclick="[insert calling of function Minesweeper here?]">Minesweeper</div>