Webview attributes overhaul

Imported from:
884a5b43cb
This commit is contained in:
Cheng Zhao 2014-12-08 16:14:12 -08:00
parent e0f1433c12
commit d7eae69587
5 changed files with 145 additions and 91 deletions

View file

@ -36,17 +36,19 @@ for arg in process.argv
if location.protocol is 'chrome-devtools:'
# Override some inspector APIs.
require path.join(__dirname, 'inspector')
require './inspector'
nodeIntegration = 'true'
else if location.protocol is 'chrome-extension:'
# Add implementations of chrome API.
require path.join(__dirname, 'chrome-api')
require './chrome-api'
nodeIntegration = 'true'
else
# Override default web functions.
require path.join(__dirname, 'override')
require './override'
# Load webview tag implementation.
require path.join(__dirname, 'web-view/web-view') unless process.guestInstanceId?
unless process.guestInstanceId?
require './web-view/web-view'
require './web-view/web-view-attributes'
if nodeIntegration in ['true', 'all', 'except-iframe', 'manual-enable-iframe']
# Export node bindings to global.