{"action":"opened","issue":{"url":"https://api.github.com/repos/atom/electron/issues/3196","labels_url":"https://api.github.com/repos/atom/electron/issues/3196/labels{/name}","comments_url":"https://api.github.com/repos/atom/electron/issues/3196/comments","events_url":"https://api.github.com/repos/atom/electron/issues/3196/events","html_url":"https://github.com/atom/electron/issues/3196","id":113159587,"number":3196,"title":"Loading URL from <webview> tag bulkier than using mainWindow.loadUrl() and jQuery problem","user":{"login":"tevfik6","id":1277211,"avatar_url":"https://avatars.githubusercontent.com/u/1277211?v=3","gravatar_id":"","url":"https://api.github.com/users/tevfik6","html_url":"https://github.com/tevfik6","followers_url":"https://api.github.com/users/tevfik6/followers","following_url":"https://api.github.com/users/tevfik6/following{/other_user}","gists_url":"https://api.github.com/users/tevfik6/gists{/gist_id}","starred_url":"https://api.github.com/users/tevfik6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tevfik6/subscriptions","organizations_url":"https://api.github.com/users/tevfik6/orgs","repos_url":"https://api.github.com/users/tevfik6/repos","events_url":"https://api.github.com/users/tevfik6/events{/privacy}","received_events_url":"https://api.github.com/users/tevfik6/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-24T13:17:30Z","updated_at":"2015-10-24T13:17:30Z","closed_at":null,"body":"Hello, \r\n\r\nI really liked Electron and I have a really good opportunity to learn NodeJS while building something. \r\nI'm working on simple projects just to learn. Yesterday I came to a point where I need to read some html elements or delegate some of events on a url loaded in the window. \r\n\r\nThe best way I thought, injecting jQuery and implementing with that. It seems like i have three options;\r\n\r\n- iframe\r\n- <webview> tag\r\n- using loadUrl, loading the url from mainWindow.loadUrl\r\n\r\nMy App is already using the mainWindow.loadUrl method. Using this way there is no way to inject jQuery and run some jQuery code i guess. I've noticed [webContents.executeJavaScript(code[, userGesture])] (https://github.com/atom/electron/blob/master/docs/api/web-contents.md#webcontentsexecutejavascriptcode-usergesture) but with this function i could not inject jQuery even though i disable all security settings in webContets of mainWindow. \r\n\r\nThen I decided to use <webview> tag. First thing i notice resizing the window has a huge rendering difference then loading url without webview tag. It worked bulky. I stopped using it.\r\n\r\nThe only option left is iframe. I was thinking to stay in the node js side rather than going to html side. \r\nYou might say you can also right NodeJS codes in html/javascript side but unfortunately not, the link I'm trying to load requires me to disable nodejs in the window where i load the link. \r\n\r\nSo, as a summary; I don't know do we have specific reason not to have it but it would be great to have webContents.injectJSLibrary. \r\nOr do we have any other way where I can load the jQuery and run jQuery codes on a website i loaded using loadUrl method not with iframe or <webview> tag.\r\n\r\nThanks in advance for any comment!\r\n\r\nTev."}}