- From: Jeremy Roman <notifications@github.com>
- Date: Sat, 17 Sep 2022 13:59:11 -0700
- To: whatwg/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Saturday, 17 September 2022 20:59:24 UTC
I suspect this change could be made in a web-compatible way, but FWIW you could technically use a callback function as a dictionary, since functions are objects.
```
let silly = Object.assign(e => {}, {once: true});
document.body.addEventListener('click', silly, silly);
```
Probably just making these distinguishable and keeping the current logic whereby the IsCallable check happens before the dictionary conversion.
As a consistency point, EventTarget/addEventListener looks more like your second example -- but I don't think that pattern is ubiquitous.
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/issues/1191#issuecomment-1250139587
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/webidl/issues/1191/1250139587@github.com>
Received on Saturday, 17 September 2022 20:59:24 UTC