4

I have a BrowserWindow object that pointing to a website.

mainWindow.loadUrl('http://example.com/');

Now I want to execute scripts on this website, so I'm looking for a method like window.eval in node-webkit, but I have not found. Anyone know?

Thanks in advance!

1 Answer 1

11

webContents.executeJavaScript is the method:

myCoolWindow.webContents.executeJavaScript('window.close()');
Sign up to request clarification or add additional context in comments.

1 Comment

that link says it's not found.. I think this is the related link

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.