2014-10-25 15:23:49 +00:00
|
|
|
assert = require 'assert'
|
|
|
|
path = require 'path'
|
2015-07-24 07:48:13 +00:00
|
|
|
http = require 'http'
|
2014-10-25 15:23:49 +00:00
|
|
|
|
|
|
|
describe '<webview> tag', ->
|
2015-09-14 13:13:24 +00:00
|
|
|
@timeout 10000
|
|
|
|
|
2014-10-25 15:23:49 +00:00
|
|
|
fixtures = path.join __dirname, 'fixtures'
|
|
|
|
|
|
|
|
webview = null
|
|
|
|
beforeEach ->
|
|
|
|
webview = new WebView
|
|
|
|
afterEach ->
|
2015-09-15 05:45:26 +00:00
|
|
|
document.body.removeChild(webview) if document.body.contains(webview)
|
2014-10-25 15:23:49 +00:00
|
|
|
|
|
|
|
describe 'src attribute', ->
|
|
|
|
it 'specifies the page to load', (done) ->
|
|
|
|
webview.addEventListener 'console-message', (e) ->
|
|
|
|
assert.equal e.message, 'a'
|
|
|
|
done()
|
|
|
|
webview.src = "file://#{fixtures}/pages/a.html"
|
|
|
|
document.body.appendChild webview
|
|
|
|
|
|
|
|
it 'navigates to new page when changed', (done) ->
|
|
|
|
listener = (e) ->
|
|
|
|
webview.src = "file://#{fixtures}/pages/b.html"
|
|
|
|
webview.addEventListener 'console-message', (e) ->
|
|
|
|
assert.equal e.message, 'b'
|
|
|
|
done()
|
|
|
|
webview.removeEventListener 'did-finish-load', listener
|
|
|
|
webview.addEventListener 'did-finish-load', listener
|
|
|
|
webview.src = "file://#{fixtures}/pages/a.html"
|
|
|
|
document.body.appendChild webview
|
|
|
|
|
|
|
|
describe 'nodeintegration attribute', ->
|
|
|
|
it 'inserts no node symbols when not set', (done) ->
|
|
|
|
webview.addEventListener 'console-message', (e) ->
|
2015-07-14 15:42:03 +00:00
|
|
|
assert.equal e.message, 'undefined undefined undefined undefined'
|
2014-10-25 15:23:49 +00:00
|
|
|
done()
|
|
|
|
webview.src = "file://#{fixtures}/pages/c.html"
|
|
|
|
document.body.appendChild webview
|
|
|
|
|
|
|
|
it 'inserts node symbols when set', (done) ->
|
|
|
|
webview.addEventListener 'console-message', (e) ->
|
|
|
|
assert.equal e.message, 'function object object'
|
|
|
|
done()
|
|
|
|
webview.setAttribute 'nodeintegration', 'on'
|
|
|
|
webview.src = "file://#{fixtures}/pages/d.html"
|
|
|
|
document.body.appendChild webview
|
2014-10-27 11:26:45 +00:00
|
|
|
|
2015-09-01 03:51:28 +00:00
|
|
|
it 'loads node symbols after POST navigation when set', (done) ->
|
|
|
|
webview.addEventListener 'console-message', (e) ->
|
|
|
|
assert.equal e.message, 'function object object'
|
|
|
|
done()
|
|
|
|
webview.setAttribute 'nodeintegration', 'on'
|
|
|
|
webview.src = "file://#{fixtures}/pages/post.html"
|
|
|
|
document.body.appendChild webview
|
|
|
|
|
2015-08-27 20:05:06 +00:00
|
|
|
# If the test is executed with the debug build on Windows, we will skip it
|
|
|
|
# because native modules don't work with the debug build (see issue #2558).
|
|
|
|
if process.platform isnt 'win32' or
|
|
|
|
process.execPath.toLowerCase().indexOf('\\out\\d\\') is -1
|
|
|
|
it 'loads native modules when navigation happens', (done) ->
|
|
|
|
listener = (e) ->
|
|
|
|
webview.removeEventListener 'did-finish-load', listener
|
|
|
|
listener2 = (e) ->
|
|
|
|
assert.equal e.message, 'function'
|
|
|
|
done()
|
|
|
|
webview.addEventListener 'console-message', listener2
|
|
|
|
webview.reload()
|
|
|
|
webview.addEventListener 'did-finish-load', listener
|
|
|
|
webview.setAttribute 'nodeintegration', 'on'
|
|
|
|
webview.src = "file://#{fixtures}/pages/native-module.html"
|
|
|
|
document.body.appendChild webview
|
2015-04-26 07:49:26 +00:00
|
|
|
|
2014-11-06 07:23:42 +00:00
|
|
|
describe 'preload attribute', ->
|
|
|
|
it 'loads the script before other scripts in window', (done) ->
|
|
|
|
listener = (e) ->
|
|
|
|
assert.equal e.message, 'function object object'
|
|
|
|
webview.removeEventListener 'console-message', listener
|
|
|
|
done()
|
|
|
|
webview.addEventListener 'console-message', listener
|
|
|
|
webview.setAttribute 'preload', "#{fixtures}/module/preload.js"
|
|
|
|
webview.src = "file://#{fixtures}/pages/e.html"
|
|
|
|
document.body.appendChild webview
|
|
|
|
|
2015-09-14 08:05:58 +00:00
|
|
|
it 'preload script can still use "process" in required modules when nodeintegration is off', (done) ->
|
|
|
|
webview.addEventListener 'console-message', (e) ->
|
2015-09-22 06:40:48 +00:00
|
|
|
assert.equal e.message, 'object undefined object'
|
2015-09-14 08:05:58 +00:00
|
|
|
done()
|
|
|
|
webview.setAttribute 'preload', "#{fixtures}/module/preload-node-off.js"
|
|
|
|
webview.src = "file://#{fixtures}/api/blank.html"
|
|
|
|
document.body.appendChild webview
|
|
|
|
|
2015-01-26 23:50:10 +00:00
|
|
|
it 'receives ipc message in preload script', (done) ->
|
|
|
|
message = 'boom!'
|
|
|
|
listener = (e) ->
|
|
|
|
assert.equal e.channel, 'pong'
|
|
|
|
assert.deepEqual e.args, [message]
|
|
|
|
webview.removeEventListener 'ipc-message', listener
|
|
|
|
done()
|
|
|
|
listener2 = (e) ->
|
|
|
|
webview.send 'ping', message
|
|
|
|
webview.removeEventListener 'did-finish-load', listener2
|
|
|
|
webview.addEventListener 'ipc-message', listener
|
|
|
|
webview.addEventListener 'did-finish-load', listener2
|
|
|
|
webview.setAttribute 'preload', "#{fixtures}/module/preload-ipc.js"
|
|
|
|
webview.src = "file://#{fixtures}/pages/e.html"
|
|
|
|
document.body.appendChild webview
|
|
|
|
|
2014-11-12 02:39:15 +00:00
|
|
|
describe 'httpreferrer attribute', ->
|
|
|
|
it 'sets the referrer url', (done) ->
|
|
|
|
referrer = 'http://github.com/'
|
|
|
|
listener = (e) ->
|
|
|
|
assert.equal e.message, referrer
|
|
|
|
webview.removeEventListener 'console-message', listener
|
|
|
|
done()
|
|
|
|
webview.addEventListener 'console-message', listener
|
|
|
|
webview.setAttribute 'httpreferrer', referrer
|
|
|
|
webview.src = "file://#{fixtures}/pages/referrer.html"
|
|
|
|
document.body.appendChild webview
|
|
|
|
|
2015-05-06 05:06:15 +00:00
|
|
|
describe 'useragent attribute', ->
|
|
|
|
it 'sets the user agent', (done) ->
|
|
|
|
referrer = 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko'
|
|
|
|
listener = (e) ->
|
|
|
|
assert.equal e.message, referrer
|
|
|
|
webview.removeEventListener 'console-message', listener
|
|
|
|
done()
|
|
|
|
webview.addEventListener 'console-message', listener
|
|
|
|
webview.setAttribute 'useragent', referrer
|
|
|
|
webview.src = "file://#{fixtures}/pages/useragent.html"
|
|
|
|
document.body.appendChild webview
|
|
|
|
|
2014-12-18 02:14:10 +00:00
|
|
|
describe 'disablewebsecurity attribute', ->
|
|
|
|
it 'does not disable web security when not set', (done) ->
|
|
|
|
src = "
|
|
|
|
<script src='file://#{__dirname}/static/jquery-2.0.3.min.js'></script>
|
|
|
|
<script>console.log('ok');</script>
|
|
|
|
"
|
|
|
|
encoded = btoa(unescape(encodeURIComponent(src)))
|
|
|
|
listener = (e) ->
|
|
|
|
assert /Not allowed to load local resource/.test(e.message)
|
|
|
|
webview.removeEventListener 'console-message', listener
|
|
|
|
done()
|
|
|
|
webview.addEventListener 'console-message', listener
|
|
|
|
webview.src = "data:text/html;base64,#{encoded}"
|
|
|
|
document.body.appendChild webview
|
|
|
|
|
|
|
|
it 'disables web security when set', (done) ->
|
|
|
|
src = "
|
|
|
|
<script src='file://#{__dirname}/static/jquery-2.0.3.min.js'></script>
|
|
|
|
<script>console.log('ok');</script>
|
|
|
|
"
|
|
|
|
encoded = btoa(unescape(encodeURIComponent(src)))
|
|
|
|
listener = (e) ->
|
|
|
|
assert.equal e.message, 'ok'
|
|
|
|
webview.removeEventListener 'console-message', listener
|
|
|
|
done()
|
|
|
|
webview.addEventListener 'console-message', listener
|
|
|
|
webview.setAttribute 'disablewebsecurity', ''
|
|
|
|
webview.src = "data:text/html;base64,#{encoded}"
|
|
|
|
document.body.appendChild webview
|
|
|
|
|
2015-08-27 01:27:03 +00:00
|
|
|
describe 'partition attribute', ->
|
2015-09-03 00:47:58 +00:00
|
|
|
it 'inserts no node symbols when not set', (done) ->
|
|
|
|
webview.addEventListener 'console-message', (e) ->
|
|
|
|
assert.equal e.message, 'undefined undefined undefined undefined'
|
|
|
|
done()
|
|
|
|
webview.src = "file://#{fixtures}/pages/c.html"
|
2015-09-05 03:19:03 +00:00
|
|
|
webview.partition = 'test1'
|
2015-09-03 00:47:58 +00:00
|
|
|
document.body.appendChild webview
|
|
|
|
|
|
|
|
it 'inserts node symbols when set', (done) ->
|
|
|
|
webview.addEventListener 'console-message', (e) ->
|
|
|
|
assert.equal e.message, 'function object object'
|
|
|
|
done()
|
|
|
|
webview.setAttribute 'nodeintegration', 'on'
|
|
|
|
webview.src = "file://#{fixtures}/pages/d.html"
|
2015-09-05 03:19:03 +00:00
|
|
|
webview.partition = 'test2'
|
2015-09-03 00:47:58 +00:00
|
|
|
document.body.appendChild webview
|
|
|
|
|
2015-08-27 01:27:03 +00:00
|
|
|
it 'isolates storage for different id', (done) ->
|
|
|
|
listener = (e) ->
|
|
|
|
assert.equal e.message, " 0"
|
2015-08-31 18:23:31 +00:00
|
|
|
webview.removeEventListener 'console-message', listener
|
2015-08-27 01:27:03 +00:00
|
|
|
done()
|
2015-08-31 18:23:31 +00:00
|
|
|
window.localStorage.setItem 'test', 'one'
|
|
|
|
webview.addEventListener 'console-message', listener
|
|
|
|
webview.src = "file://#{fixtures}/pages/partition/one.html"
|
2015-09-05 03:19:03 +00:00
|
|
|
webview.partition = 'test3'
|
2015-08-31 18:23:31 +00:00
|
|
|
document.body.appendChild webview
|
|
|
|
|
|
|
|
it 'uses current session storage when no id is provided', (done) ->
|
|
|
|
listener = (e) ->
|
|
|
|
assert.equal e.message, "one 1"
|
|
|
|
webview.removeEventListener 'console-message', listener
|
|
|
|
done()
|
|
|
|
window.localStorage.setItem 'test', 'one'
|
|
|
|
webview.addEventListener 'console-message', listener
|
2015-08-27 01:27:03 +00:00
|
|
|
webview.src = "file://#{fixtures}/pages/partition/one.html"
|
|
|
|
document.body.appendChild webview
|
|
|
|
|
2015-09-22 13:17:50 +00:00
|
|
|
describe 'allowpopups attribute', ->
|
|
|
|
it 'can not open new window when not set', (done) ->
|
|
|
|
listener = (e) ->
|
|
|
|
assert.equal e.message, 'null'
|
|
|
|
webview.removeEventListener 'console-message', listener
|
|
|
|
done()
|
|
|
|
webview.addEventListener 'console-message', listener
|
|
|
|
webview.src = "file://#{fixtures}/pages/window-open-hide.html"
|
|
|
|
document.body.appendChild webview
|
|
|
|
|
|
|
|
it 'can open new window when set', (done) ->
|
|
|
|
listener = (e) ->
|
|
|
|
assert.equal e.message, 'window'
|
|
|
|
webview.removeEventListener 'console-message', listener
|
|
|
|
done()
|
|
|
|
webview.addEventListener 'console-message', listener
|
|
|
|
webview.setAttribute 'allowpopups', 'on'
|
|
|
|
webview.src = "file://#{fixtures}/pages/window-open-hide.html"
|
|
|
|
document.body.appendChild webview
|
|
|
|
|
2014-10-27 11:26:45 +00:00
|
|
|
describe 'new-window event', ->
|
|
|
|
it 'emits when window.open is called', (done) ->
|
|
|
|
webview.addEventListener 'new-window', (e) ->
|
2015-07-10 04:14:25 +00:00
|
|
|
assert.equal e.url, 'http://host/'
|
2014-10-27 11:26:45 +00:00
|
|
|
assert.equal e.frameName, 'host'
|
|
|
|
done()
|
|
|
|
webview.src = "file://#{fixtures}/pages/window-open.html"
|
|
|
|
document.body.appendChild webview
|
|
|
|
|
|
|
|
it 'emits when link with target is called', (done) ->
|
|
|
|
webview.addEventListener 'new-window', (e) ->
|
|
|
|
assert.equal e.url, 'http://host/'
|
|
|
|
assert.equal e.frameName, 'target'
|
|
|
|
done()
|
|
|
|
webview.src = "file://#{fixtures}/pages/target-name.html"
|
|
|
|
document.body.appendChild webview
|
2014-12-17 05:11:30 +00:00
|
|
|
|
|
|
|
describe 'ipc-message event', ->
|
|
|
|
it 'emits when guest sends a ipc message to browser', (done) ->
|
|
|
|
webview.addEventListener 'ipc-message', (e) ->
|
|
|
|
assert.equal e.channel, 'channel'
|
|
|
|
assert.deepEqual e.args, ['arg1', 'arg2']
|
|
|
|
done()
|
|
|
|
webview.src = "file://#{fixtures}/pages/ipc-message.html"
|
|
|
|
webview.setAttribute 'nodeintegration', 'on'
|
|
|
|
document.body.appendChild webview
|
2015-04-05 09:20:42 +00:00
|
|
|
|
|
|
|
describe 'page-title-set event', ->
|
|
|
|
it 'emits when title is set', (done) ->
|
|
|
|
webview.addEventListener 'page-title-set', (e) ->
|
|
|
|
assert.equal e.title, 'test'
|
|
|
|
assert e.explicitSet
|
|
|
|
done()
|
|
|
|
webview.src = "file://#{fixtures}/pages/a.html"
|
|
|
|
document.body.appendChild webview
|
2015-04-17 19:55:31 +00:00
|
|
|
|
2015-04-20 06:50:04 +00:00
|
|
|
describe 'page-favicon-updated event', ->
|
|
|
|
it 'emits when favicon urls are received', (done) ->
|
|
|
|
webview.addEventListener 'page-favicon-updated', (e) ->
|
2015-04-17 19:55:31 +00:00
|
|
|
assert.equal e.favicons.length, 2
|
2015-04-29 09:31:56 +00:00
|
|
|
url =
|
|
|
|
if process.platform is 'win32'
|
|
|
|
'file:///C:/favicon.png'
|
|
|
|
else
|
|
|
|
'file:///favicon.png'
|
|
|
|
assert.equal e.favicons[0], url
|
2015-04-17 19:55:31 +00:00
|
|
|
done()
|
|
|
|
webview.src = "file://#{fixtures}/pages/a.html"
|
|
|
|
document.body.appendChild webview
|
2015-05-01 05:48:23 +00:00
|
|
|
|
2015-07-08 21:34:44 +00:00
|
|
|
describe 'close event', ->
|
2015-07-10 02:38:15 +00:00
|
|
|
it 'should fire when interior page calls window.close', (done) ->
|
2015-07-08 21:34:44 +00:00
|
|
|
webview.addEventListener 'close', ->
|
|
|
|
done()
|
|
|
|
|
|
|
|
webview.src = "file://#{fixtures}/pages/close.html"
|
|
|
|
document.body.appendChild webview
|
|
|
|
|
2015-05-01 05:48:23 +00:00
|
|
|
describe '<webview>.reload()', ->
|
|
|
|
it 'should emit beforeunload handler', (done) ->
|
|
|
|
listener = (e) ->
|
|
|
|
assert.equal e.channel, 'onbeforeunload'
|
|
|
|
webview.removeEventListener 'ipc-message', listener
|
|
|
|
done()
|
2015-05-04 04:51:28 +00:00
|
|
|
listener2 = (e) ->
|
|
|
|
webview.reload()
|
|
|
|
webview.removeEventListener 'did-finish-load', listener2
|
2015-05-01 05:48:23 +00:00
|
|
|
webview.addEventListener 'ipc-message', listener
|
2015-05-04 04:51:28 +00:00
|
|
|
webview.addEventListener 'did-finish-load', listener2
|
2015-05-01 05:48:23 +00:00
|
|
|
webview.setAttribute 'nodeintegration', 'on'
|
|
|
|
webview.src = "file://#{fixtures}/pages/beforeunload-false.html"
|
|
|
|
document.body.appendChild webview
|
2015-05-20 03:53:08 +00:00
|
|
|
|
|
|
|
describe '<webview>.clearHistory()', ->
|
|
|
|
it 'should clear the navigation history', (done) ->
|
|
|
|
listener = (e) ->
|
|
|
|
assert.equal e.channel, 'history'
|
|
|
|
assert.equal e.args[0], 2
|
|
|
|
assert webview.canGoBack()
|
|
|
|
webview.clearHistory()
|
|
|
|
assert not webview.canGoBack()
|
|
|
|
webview.removeEventListener 'ipc-message', listener
|
|
|
|
done()
|
|
|
|
webview.addEventListener 'ipc-message', listener
|
2015-07-08 21:34:44 +00:00
|
|
|
webview.setAttribute 'nodeintegration', 'on'
|
2015-05-20 03:53:08 +00:00
|
|
|
webview.src = "file://#{fixtures}/pages/history.html"
|
|
|
|
document.body.appendChild webview
|
2015-07-24 07:33:07 +00:00
|
|
|
|
|
|
|
describe 'basic auth', ->
|
|
|
|
auth = require 'basic-auth'
|
|
|
|
|
|
|
|
it 'should authenticate with correct credentials', (done) ->
|
|
|
|
message = 'Authenticated'
|
2015-07-24 07:48:13 +00:00
|
|
|
server = http.createServer (req, res) ->
|
2015-07-24 07:33:07 +00:00
|
|
|
credentials = auth(req)
|
|
|
|
if credentials.name == 'test' and credentials.pass == 'test'
|
|
|
|
res.end(message)
|
|
|
|
else
|
|
|
|
res.end('failed')
|
|
|
|
server.close()
|
|
|
|
server.listen 0, '127.0.0.1', ->
|
|
|
|
{port} = server.address()
|
|
|
|
webview.addEventListener 'ipc-message', (e) ->
|
|
|
|
assert.equal e.channel, message
|
|
|
|
done()
|
|
|
|
webview.src = "file://#{fixtures}/pages/basic-auth.html?port=#{port}"
|
|
|
|
webview.setAttribute 'nodeintegration', 'on'
|
|
|
|
document.body.appendChild webview
|
2015-07-24 07:48:13 +00:00
|
|
|
|
|
|
|
describe 'dom-ready event', ->
|
|
|
|
it 'emits when document is loaded', (done) ->
|
|
|
|
server = http.createServer (req) ->
|
|
|
|
# Never respond, so the page never finished loading.
|
|
|
|
server.listen 0, '127.0.0.1', ->
|
|
|
|
{port} = server.address()
|
|
|
|
webview.addEventListener 'dom-ready', ->
|
|
|
|
done()
|
|
|
|
webview.src = "file://#{fixtures}/pages/dom-ready.html?port=#{port}"
|
|
|
|
document.body.appendChild webview
|
2015-07-30 16:26:57 +00:00
|
|
|
|
|
|
|
describe 'executeJavaScript', ->
|
2015-08-04 07:40:31 +00:00
|
|
|
return unless process.env.TRAVIS is 'true'
|
|
|
|
|
2015-07-30 16:26:57 +00:00
|
|
|
it 'should support user gesture', (done) ->
|
|
|
|
listener = (e) ->
|
|
|
|
webview.removeEventListener 'enter-html-full-screen', listener
|
|
|
|
done()
|
|
|
|
listener2 = (e) ->
|
|
|
|
jsScript = 'document.getElementsByTagName("video")[0].webkitRequestFullScreen()'
|
|
|
|
webview.executeJavaScript jsScript, true
|
|
|
|
webview.removeEventListener 'did-finish-load', listener2
|
|
|
|
webview.addEventListener 'enter-html-full-screen', listener
|
|
|
|
webview.addEventListener 'did-finish-load', listener2
|
|
|
|
webview.src = "file://#{fixtures}/pages/fullscreen.html"
|
|
|
|
document.body.appendChild webview
|
2015-09-18 10:28:34 +00:00
|
|
|
|
|
|
|
describe 'sendInputEvent', ->
|
|
|
|
it 'can send keyboard event', (done) ->
|
|
|
|
webview.addEventListener 'ipc-message', (e) ->
|
|
|
|
assert.equal e.channel, 'keyup'
|
|
|
|
assert.deepEqual e.args, [67, true, false]
|
|
|
|
done()
|
|
|
|
webview.addEventListener 'dom-ready', ->
|
|
|
|
webview.sendInputEvent type: 'keyup', keyCode: 'c', modifiers: ['shift']
|
|
|
|
webview.src = "file://#{fixtures}/pages/onkeyup.html"
|
|
|
|
webview.setAttribute 'nodeintegration', 'on'
|
|
|
|
document.body.appendChild webview
|
|
|
|
|
|
|
|
it 'can send mouse event', (done) ->
|
|
|
|
webview.addEventListener 'ipc-message', (e) ->
|
|
|
|
assert.equal e.channel, 'mouseup'
|
|
|
|
assert.deepEqual e.args, [10, 20, false, true]
|
|
|
|
done()
|
|
|
|
webview.addEventListener 'dom-ready', ->
|
|
|
|
webview.sendInputEvent type: 'mouseup', modifiers: ['ctrl'], x: 10, y: 20
|
|
|
|
webview.src = "file://#{fixtures}/pages/onmouseup.html"
|
|
|
|
webview.setAttribute 'nodeintegration', 'on'
|
|
|
|
document.body.appendChild webview
|
2015-12-20 03:16:22 +00:00
|
|
|
|
|
|
|
describe 'media-started-playing media-paused events', ->
|
|
|
|
it 'emits when audio starts and stops playing', (done) ->
|
|
|
|
audioPlayed = false
|
|
|
|
webview.addEventListener 'media-started-playing', ->
|
|
|
|
audioPlayed = true
|
|
|
|
webview.addEventListener 'media-paused', ->
|
|
|
|
assert audioPlayed
|
|
|
|
done()
|
|
|
|
webview.src = "file://#{fixtures}/pages/audio.html"
|
|
|
|
document.body.appendChild webview
|
2015-12-17 23:10:42 +00:00
|
|
|
|
|
|
|
describe 'found-in-page event', ->
|
|
|
|
it 'emits when a request is made', (done) ->
|
|
|
|
requestId = null
|
|
|
|
listener = (e) ->
|
|
|
|
assert.equal e.result.requestId, requestId
|
|
|
|
if e.result.finalUpdate
|
|
|
|
assert.equal e.result.matches, 3
|
|
|
|
webview.stopFindInPage "clearSelection"
|
|
|
|
done()
|
|
|
|
listener2 = (e) ->
|
|
|
|
requestId = webview.findInPage "virtual"
|
|
|
|
webview.addEventListener 'found-in-page', listener
|
|
|
|
webview.addEventListener 'did-finish-load', listener2
|
|
|
|
webview.src = "file://#{fixtures}/pages/content.html"
|
|
|
|
document.body.appendChild webview
|