mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +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... -->
|
||||
<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){
|
||||
Object.defineProperty(window, 'STARTUP_DEVTOOLS_TIMEOUT', {
|
||||
get: function(){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user