Skip to content

Instantly share code, notes, and snippets.

@triztian
Created November 12, 2015 03:16
Show Gist options
  • Save triztian/f59279d9b0172812b938 to your computer and use it in GitHub Desktop.
Save triztian/f59279d9b0172812b938 to your computer and use it in GitHub Desktop.
diff --git a/atom/renderer/lib/web-view/web-view.coffee b/atom/renderer/lib/web-view/web-view.coffee
index 3a56310..eee4a75 100644
--- a/atom/renderer/lib/web-view/web-view.coffee
+++ b/atom/renderer/lib/web-view/web-view.coffee
@@ -199,12 +199,24 @@ registerBrowserPluginElement = ->
proto = Object.create HTMLObjectElement.prototype
proto.createdCallback = ->
+
@setAttribute 'type', 'application/browser-plugin'
@setAttribute 'id', 'browser-plugin-' + getNextId()
+ @setAttribute 'wmode', 'transparent'
# The <object> node fills in the <webview> container.
+
@style.display = 'block'
@style.width = '100%'
@style.height = '100%'
+ @style['background-color'] = 'transparent'
+
+ paramNode = document.createElement 'param'
+
+ paramNode.setAttribute 'name', 'wmode'
+ paramNode.setAttribute 'value', 'transparent'
+
+ @appendChild paramNode
+
proto.attributeChangedCallback = (name, oldValue, newValue) ->
internal = v8Util.getHiddenValue this, 'internal'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment