| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
The motivation for this is:
|
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
|
I need to think about this more. |
Sorry, something went wrong.
|
Re-applied the changes with weak event handlers based on the comment (using an object as the retainer key) |
Sorry, something went wrong.
Sorry, something went wrong.
|
Do you plan to add documentation for this feature? |
Sorry, something went wrong.
Not really since this feature is internal to core - users cannot create weak listeners. This is because that is a spec requirement (we cannot add things to the standard EventTarget). In the future - I'd like to use the mechanics of this in several utilities (and internally) namely:
|
Sorry, something went wrong.
Sorry, something went wrong.
|
@jasnell @addaleax @aduh95 I would really prefer not to land this without a review of the latest changes ^^ A review would be appreciated (the main change I want a LGTM on is passing a retainer object and not a boolean since that didn't work) |
Sorry, something went wrong.
PR-URL: #36607 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
PR-URL: #36607 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
| Back | FazBrowse Home | New Git URL |
This is a first attempt at "weak listeners".
Still a draft since I have no idea how to test this :] Do we have any idea how to test WeakRefs? EDIT: added a test.
Also still playing with this - but I think this is generally very useful and I will move certain APIs to it.
Checklist