News for hackers. Stuff that matters.
Re:Qt for WebAssembly by dchest on Tuesday June 19, 2018 @05:29PM (#17350421)

    <dialog>
        <p>Hello world</p>
        <button>OK</button>
    </dialog>

    <script>
        let dialog = document.querySelector('dialog');
        dialog.querySelector('button').addEventListener('click', () => dialog.close());
        dialog.showModal();
    </script>
Re:Qt for WebAssembly by yoavm on Tuesday June 19, 2018 @07:57PM (#17351287)
Yeah, it would be great when it'll work for more than just 60% of the internet users. Maybe then we can actually use it!
Re:Qt for WebAssembly by dchest on Wednesday June 20, 2018 @05:16AM (#17353713)
I'm so sorry that a little bit of HTML and JavaScript reminds you and other commenters under my post of web developer's Old Browser nightmares and brave endeavors of satisfying 100% of Web users at any the cost, but we're talking about Electron which ships a quite recent version of Chromium :-)
Re:Qt for WebAssembly by singularity2001 on Wednesday June 20, 2018 @05:13AM (#17353698)
https://caniuse.com/#search=dialog ? NO! <script> confirm("No dialog needed") </script>
Re:Qt for WebAssembly by dchest on Wednesday June 20, 2018 @05:24AM (#17353753)
Nice table, which shows that you are free to use <dialog> and many other modern features to write your Electron app:

  Electron v2.0.2
  Chromium v61.0.3163.100
  Node v8.9.3v8 v6.1.534.41
Re:Qt for WebAssembly by singularity2001 on Wednesday June 20, 2018 @11:28AM (#17356286)
Electron… fair point! Except we were comparing new web GUIs.

On the flip side Electron explicitly does not impliment confirm() and prompt() which made me furious.

So there is definitely truth in the general js=cluster-fuck sentiment.

Re:Qt for WebAssembly by hajile on Wednesday June 20, 2018 @02:35PM (#17358288)
`confirm()`, `alert()`, `prompt()` and similar are widely regarded as mistakes. Including them on your new Electron app isn't something you should be doing in the first place.
Re:Qt for WebAssembly by dchest on Wednesday June 20, 2018 @03:21PM (#17358796)
Re:Qt for WebAssembly by singularity2001 on Wednesday June 20, 2018 @05:01AM (#17353652)
TypeError: dialog.showModal is not a function
Re:Qt for WebAssembly by dchest on Wednesday June 20, 2018 @05:20AM (#17353724)
Your Electron version is old; if you're shipping it, you're probably putting your users at risk due to security issues in them. Check the latest versions here: https://electronjs.org/releases
Re:Qt for WebAssembly by _ZeD_ on Wednesday June 20, 2018 @01:57AM (#17352937)
cool... then now make it work for ie. and mobiles. and... everything else other than the betas of chrome and firefox
Re:Qt for WebAssembly by thiht on Wednesday June 20, 2018 @11:51AM (#17356491)