You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A question about a constraint or non-constraint in this discussion. If non-constraint...I'll have another proposal.
First, a number of quite-cool ideas in Ted's proposal. MDN strongly recommends against inline event handlers. @handler(event_name, event_target) makes for something a lot more convenient than inline, so people will use it.
When people do use inline...for example in py-event_api.html:
<divpy-mousemove="move">py-mousemove</div>
Does the attribute value -- move -- have to be a valid JS expression, pointing at a known symbol?
I think JS tooling doesn't really care, because JS (in browser) scopes are such a mess. Symbols can arrive async, so static analysis can never know.
I mean more "do we care"? Are we ok with saying: "Sure, your expectation is thatmove will exist in JS, but really, there's just this sort-of-anonymous proxy created by Python code via Pyodide".
I view the <button onclick="py.foo()"> as a bit more promising in this regard. There can be an actual py object in JS.
The text was updated successfully, but these errors were encountered:
A question about a constraint or non-constraint in this discussion. If non-constraint...I'll have another proposal.
First, a number of quite-cool ideas in Ted's proposal. MDN strongly recommends against inline event handlers.
@handler(event_name, event_target)
makes for something a lot more convenient than inline, so people will use it.When people do use inline...for example in
py-event_api.html
:Does the attribute value --
move
-- have to be a valid JS expression, pointing at a known symbol?I think JS tooling doesn't really care, because JS (in browser) scopes are such a mess. Symbols can arrive async, so static analysis can never know.
I mean more "do we care"? Are we ok with saying: "Sure, your expectation is that
move
will exist in JS, but really, there's just this sort-of-anonymous proxy created by Python code via Pyodide".I view the
<button onclick="py.foo()">
as a bit more promising in this regard. There can be an actualpy
object in JS.The text was updated successfully, but these errors were encountered: