]> khamidou — GitHub mirrors - electron.git/commitdiff
Devtools no longer uses iframes
authorCheng Zhao <zcbenz@gmail.com>
Wed, 2 Sep 2015 10:28:40 +0000 (18:28 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 3 Sep 2015 08:50:24 +0000 (17:50 +0900)
atom/renderer/lib/inspector.coffee

index 569f7e5ec178727c618fe2ea69774b81e0ddbf4e..126f68f9608e2023061a37e0e9e958c30aa10607 100644 (file)
@@ -1,11 +1,9 @@
 window.onload = ->
-  inspectorFrame = document.getElementById('inspector-app-iframe').contentWindow
-
   # Use menu API to show context menu.
-  inspectorFrame.eval 'InspectorFrontendHost.showContextMenuAtPoint = parent.createMenu'
+  InspectorFrontendHost.showContextMenuAtPoint = createMenu
 
   # Use dialog API to override file chooser dialog.
-  inspectorFrame.eval 'WebInspector.createFileSelectorElement = parent.createFileSelectorElement'
+  WebInspector.createFileSelectorElement = createFileSelectorElement
 
 convertToMenuTemplate = (items) ->
   template = []
@@ -60,7 +58,3 @@ createFileSelectorElement = (callback) ->
   fileSelectorElement.style.display = 'none'
   fileSelectorElement.click = showFileChooserDialog.bind this, callback
   return fileSelectorElement
-
-# Exposed for iframe.
-window.createMenu = createMenu
-window.createFileSelectorElement = createFileSelectorElement