mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
added a tool to track stray globals...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
14a0d3c3ba
commit
141e2e8295
@ -44,6 +44,16 @@ function scopeDiff(cur=window, base=__window){
|
|||||||
|
|
||||||
<!-- DevTools fail-safe for electron/nw... -->
|
<!-- DevTools fail-safe for electron/nw... -->
|
||||||
<script>
|
<script>
|
||||||
|
// used to track stray globals...
|
||||||
|
var trackGlobal = function(name){
|
||||||
|
Object.defineProperty(window, name, {
|
||||||
|
get: function(){
|
||||||
|
return this['__tracked_'+name] },
|
||||||
|
set: function(value){
|
||||||
|
this['__tracked_'+name] = value
|
||||||
|
debugger },
|
||||||
|
}) }
|
||||||
|
|
||||||
if(window.require){
|
if(window.require){
|
||||||
Object.defineProperty(window, 'STARTUP_DEVTOOLS_TIMEOUT', {
|
Object.defineProperty(window, 'STARTUP_DEVTOOLS_TIMEOUT', {
|
||||||
get: function(){
|
get: function(){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user