]> khamidou — GitHub mirrors - electron.git/commitdiff
Show devtools on right click in specs window.
authorCheng Zhao <zcbenz@gmail.com>
Wed, 31 Jul 2013 02:55:47 +0000 (10:55 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 31 Jul 2013 02:55:47 +0000 (10:55 +0800)
spec/index.html

index c80c209fdc1be6297eaa9820d5191ea3fcf31c33..16d8389edaf31fdf094502ea60997d8fb0232970 100644 (file)
@@ -8,6 +8,11 @@
 
 <script type="text/javascript" charset="utf-8">
 (function() {
+  // Show DevTools.
+  document.oncontextmenu = function(e) {
+    require('remote').getCurrentWindow().inspectElement(e.clientX, e.clientY);
+  }
+
   require('coffee-script'); // Supports .coffee tests.
 
   var Mocha = require('mocha');