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 c80c209..16d8389 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');