scripting: expose Image()
canvas: typo
This commit is contained in:
parent
c84067c456
commit
23dadaaf7d
4 changed files with 7 additions and 2 deletions
|
|
@ -180,7 +180,7 @@ class CanvasWidget extends Canvas {
|
|||
|
||||
if (!this.getProp('onResize')) return
|
||||
|
||||
this.scripts.onDraw.run({
|
||||
this.scripts.onResize.run({
|
||||
value: this.value,
|
||||
width: this.width,
|
||||
height: this.height,
|
||||
|
|
|
|||
|
|
@ -506,9 +506,11 @@ class ScriptVm extends Vm {
|
|||
|
||||
}
|
||||
|
||||
this.sandbox.contentWindow.Image = Image
|
||||
|
||||
for (var imports of ['set', 'get', 'getProp', 'getIndex', 'updateProp', 'send', 'httpGet', 'stateGet', 'stateSet', 'storage',
|
||||
'setInterval', 'clearInterval', 'setTimeout', 'clearTimeout', 'setFocus', 'unfocus', 'setScroll', 'getScroll', 'toolbar',
|
||||
'openUrl', 'getVar', 'setVar', 'runAs']) {
|
||||
'openUrl', 'getVar', 'setVar', 'runAs', 'Image']) {
|
||||
this.sanitize(this.sandbox.contentWindow[imports])
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue