html - creating custom web interface app using node-webkit and manipulating DOM with Javascript -
I want to create a custom web interface / app on a web site. A well-organized / custom visual data of important summary data can be cached locally on the site and weekly updates can be done if there is a change in the source site. I am using two windows, one window I am loading html from remote site, second window I use javascript to manipulate the first window's domains / tables only to display important information if doing so There is a better method or device, as I have not found yet I am having problems with javascript which can be used to manipulate the first window's domes. Shm not.
I'm trying to edit / edit (hide / hide the colors on table rows) Changes in the second window Javascript is running The first window (startup node-webkit) says Docs Should I have universal access to other windows? How do I ensure that this is true?
var gui = require ('nw.gui'); Var new_win = GUI.Window.get (window.open ('http://example.com/index.html')); Var my_elem = new_win.document.getElementById ('myelement'); My_elem.style.display = 'none';
Type error: Undefined property of 'getElementById' can not be read
Any ideas?
To use the document property of a new window, you have to access it in the Window key.
Change it to your line 3 by default:
var my_elem = new_win.window.document.getElementById ('myelement');
Comments
Post a Comment