[Bug] "Illegal invocation"?

This issue has been tracked since 2022-07-26.

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
More Details About Repo
Owner Name bigskysoftware
Repo Name _hyperscript
Full Name bigskysoftware/_hyperscript
Language JavaScript
Created Date 2020-05-27
Updated Date 2022-11-25
Star Count 1265
Watcher Count 18
Fork Count 75
Issue Count 86

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date