Merge pull request #11798 from electron/shadowroot-deprecate-fix

Migrate deprecated web-view method
This commit is contained in:
Charles Kerr 2018-01-31 22:09:33 -07:00 committed by GitHub
commit b32a7d4cb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,7 +27,7 @@ class WebViewImpl {
// on* Event handlers.
this.on = {}
this.browserPluginNode = this.createBrowserPluginNode()
const shadowRoot = this.webviewNode.createShadowRoot()
const shadowRoot = this.webviewNode.attachShadow({mode: 'open'})
shadowRoot.innerHTML = '<!DOCTYPE html><style type="text/css">:host { display: flex; }</style>'
this.setupWebViewAttributes()
this.setupFocusPropagation()