scripting: refactor script to reduce heap (builtin script are not widgets anymore)

script widget: add onKeyboard and remove onEvent
This commit is contained in:
jean-emmanuel 2022-01-13 11:53:58 +01:00
parent 233c9c8920
commit df6f9e110a
8 changed files with 129 additions and 256 deletions

View file

@ -296,9 +296,11 @@ var converters = [
if (data.type === 'script') {
if (data.event === 'once') {
data.onCreate = data.script
data.event = 'value'
} else if (data.event === 'keyboard') {
data.onKeyboard = data.script
} else if (data.event === 'value') {
data.onValue = data.script
}
else data.onEvent = data.script
} else {
data.onValue = data.script
}