_hyperscript icon indicating copy to clipboard operation
_hyperscript copied to clipboard

[Bug] "Illegal invocation"?

Open rozek opened this issue 3 years ago • 0 comments

The following code

set Test to ''
put 0 after Test

(e.g., placed in an on click handler) leads to an "Illegal invocation" error.

_hyperscript.min.js:1 Illegal invocation
e.meta.reject @ _hyperscript.min.js:1
unifiedExec @ _hyperscript.min.js:1
a.execute @ _hyperscript.min.js:1
execute @ _hyperscript.min.js:1
a @ _hyperscript.min.js:1

_hyperscript.min.js:1 hypertrace /// 
print @ _hyperscript.min.js:1
e.meta.reject @ _hyperscript.min.js:1
unifiedExec @ _hyperscript.min.js:1
a.execute @ _hyperscript.min.js:1
execute @ _hyperscript.min.js:1

a @ _hyperscript.min.js:1
_hyperscript.min.js:1   -> on click   - <button _=​"
    on click
      set Test to ''
      put 0 after Test
    end
  ">​Press Me​</button>​
print @ _hyperscript.min.js:1
e.meta.reject @ _hyperscript.min.js:1
unifiedExec @ _hyperscript.min.js:1
a.execute @ _hyperscript.min.js:1
execute @ _hyperscript.min.js:1
a @ _hyperscript.min.js:1

Why? The code looks correct for me...

Addenda:

  • put 0 at the end of Test does not work either
  • but append 0 to Test works as intended

rozek avatar Jul 26 '22 08:07 rozek