-WebView = require './web-view'
+WebViewImpl = require './web-view'
guestViewInternal = require './guest-view-internal'
webViewConstants = require './web-view-constants'
@webViewImpl.parseSrcAttribute()
# Sets up all of the webview attributes.
-WebView::setupWebViewAttributes = ->
+WebViewImpl::setupWebViewAttributes = ->
@attributes = {}
@attributes[webViewConstants.ATTRIBUTE_ALLOWTRANSPARENCY] = new AllowTransparencyAttribute(this)
getNextId = -> ++nextId
# Represents the internal state of the WebView node.
-class WebView
+class WebViewImpl
constructor: (@webviewNode) ->
v8Util.setHiddenValue @webviewNode, 'internal', this
@attached = false
createBrowserPluginNode: ->
# We create BrowserPlugin as a custom element in order to observe changes
# to attributes synchronously.
- browserPluginNode = new WebView.BrowserPlugin()
+ browserPluginNode = new WebViewImpl.BrowserPlugin()
v8Util.setHiddenValue browserPluginNode, 'internal', this
browserPluginNode
# Load the plugin immediately.
unused = this.nonExistentAttribute
- WebView.BrowserPlugin = webFrame.registerEmbedderCustomElement 'browserplugin',
+ WebViewImpl.BrowserPlugin = webFrame.registerEmbedderCustomElement 'browserplugin',
extends: 'object', prototype: proto
delete proto.createdCallback
proto = Object.create HTMLObjectElement.prototype
proto.createdCallback = ->
- new WebView(this)
+ new WebViewImpl(this)
proto.attributeChangedCallback = (name, oldValue, newValue) ->
internal = v8Util.getHiddenValue this, 'internal'
"getId"
]
- # Forward proto.foo* method calls to WebView.foo*.
+ # Forward proto.foo* method calls to WebViewImpl.foo*.
createHandler = (m) ->
(args...) ->
internal = v8Util.getHiddenValue this, 'internal'
window.removeEventListener event.type, listener, useCapture
window.addEventListener 'readystatechange', listener, true
-module.exports = WebView
+module.exports = WebViewImpl