Browse Source

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

Migrate deprecated web-view method
Charles Kerr 7 years ago
parent
commit
b32a7d4cb4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/renderer/web-view/web-view.js

+ 1 - 1
lib/renderer/web-view/web-view.js

@@ -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()