Closed sorvell closed 2 years ago
Really odd edge case. I guess the code where you found this must have been intentionally using a function in this way, since the problem is that capture
isn't set properly in this case?
@bicknellr fyi
Really odd edge case. I guess the code where you found this must have been intentionally using a function in this way, since the problem is that capture isn't set properly in this case?
Yeah, in lit-html we pass the listener from event bindings as both the listener and options arguments. This lets us very easily support an object with handleEvent
and options, or a method with the @eventOptions()
decorator - which just sets the options properties on the method.
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.
. If the bot doesn't comment, it means it doesn't think anything has changed.
ℹ️ Googlers: Go here for more info.
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.
. If the bot doesn't comment, it means it doesn't think anything has changed.
ℹ️ Googlers: Go here for more info.
+1 on splitting the event phase part into a different PR, if possible.
Fixes #468 and #471
instanceof Object
. This allows functions to be used in addition to objects.eventPhase
to properly beEvent.AT_TARGET
on retargeted events.