script: print warning when using advanced syntaxes in scripts.
This commit is contained in:
parent
74fdf17efd
commit
16a87b5b0b
1 changed files with 3 additions and 0 deletions
|
|
@ -217,6 +217,9 @@ class Widget extends EventEmitter {
|
|||
|
||||
Script = Script || require('../scripts/script')
|
||||
if (this.getProp('script') && !(this instanceof Script)) {
|
||||
if (typeof this.props.script == 'string' && this.props.script.match(/OSC\{|@\{|VAR\{/)) {
|
||||
this.errorProp('script', 'syntax', 'using advanced syntaxes in the script property is strongly discouraged and may result in unexpected behaviors.')
|
||||
}
|
||||
this.script = new Script({props:{
|
||||
id: this.getProp('id') + '/script',
|
||||
script: this.getProp('script'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue