Node-webkit opening a new window and listening for "loaded" event

6 views
Skip to first unread message

second...@gmail.com

unread,
Feb 1, 2014, 8:16:04 AM2/1/14
to node-...@googlegroups.com
OK so I couldn't find an answer for this one, I am trying to open a window, execute a command once it's loaded, and then modify it's DOM from the main window.
Here's my sample code:

    var window = window.open('empty.html',{
        "position": "center",
        "focus": true,
        "toolbar": false,
        "frame": true
      });
    ...
    window.on("loaded",function() {
    ...

It doesn't fire. when I tried

    var a_window = window.open('empty.html',{
      "position": "center",
      "focus": true,
      "toolbar": false,
      "frame": true
    });
    a_window = gui.Window.get(a_window);
    ...
    a_window.on("loaded",function() {
    ...

but here it doesn't even open the window! (No I don't have a hide() function inside the callback) also, no error is thrown. Any help?

Marc Torruella

unread,
Feb 2, 2014, 4:55:37 AM2/2/14
to node-...@googlegroups.com
you sure the event is "loaded" and not "load"?


--
You received this message because you are subscribed to the Google Groups "node-webkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-webkit...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages