-
-
Notifications
You must be signed in to change notification settings - Fork 635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<input onClick="string()"/> throws TypeError #1656
Comments
Hi, thanks for reporting this issue. I will look into it. |
What about referring to the method through global object? You could also extend the window type definition with external methods to have type system working. <input type="submit" onClick={window.doSomething} /> |
I'll check it out when I get home. I'm working right now
Em seg., 27 de nov. de 2023 12:44, Sampo Kivistö ***@***.***>
escreveu:
… What about referring to the method through global object? You could also
extend the window type definition with external methods to have type system
working.
<input type="submit" onClick={window.doSomething} />
—
Reply to this email directly, view it on GitHub
<#1656 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHY5WGWERISVOQRSA5SFD73YGSYODAVCNFSM6AAAAAA73CL6EWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRYGA4DIOJXHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Sorry for the late reply. As I'm not in a client-side context, the "window" word is not set. It says that window is not defined |
ah, so you want to do this in server side rendering? |
Yup, exactly. My client side code is minified on my own way, and I don't need inferno in the client side (yet). |
Observed Behaviour
the
onClick
property MUST be a MouseEventHandler or undefined. Because of this behaviour, I'm unable to call my client-side functions defined in a external script.The syntax works if you insert a
//@ts-ignore
.Expected Current Behaviour
Inferno should have string-compatible types.
Inferno Metadata
Linux
The text was updated successfully, but these errors were encountered: