inspector: code editor for script/touch/draw properties
This commit is contained in:
parent
0a1b30416f
commit
1058cb551c
8 changed files with 273 additions and 12 deletions
|
|
@ -4,7 +4,8 @@ var widgetManager = require('../../managers/widgets'),
|
|||
{deepCopy} = require('../../utils'),
|
||||
{urlParser} = require('../utils'),
|
||||
Vm = require('../vm'),
|
||||
toolbar
|
||||
toolbar,
|
||||
scriptGlobals = {empty:true}
|
||||
|
||||
|
||||
class ScriptVm extends Vm {
|
||||
|
|
@ -493,6 +494,15 @@ class ScriptVm extends Vm {
|
|||
this.sanitize(this.sandbox.contentWindow[imports])
|
||||
}
|
||||
|
||||
if (scriptGlobals.empty){
|
||||
delete scriptGlobals.empty
|
||||
for (var k in this.sandbox.contentWindow) {
|
||||
if (window[k] === undefined) scriptGlobals[k] = true
|
||||
}
|
||||
ScriptVm.globals = scriptGlobals
|
||||
console.log(Object.keys(scriptGlobals).length)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue