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
There's currently a bubbled event being watched on document that appears to be bound to document regardless of whether a textcomplete component is initialized.
Attaching an event handler on every bubbled click event is fairly expensive. This most likely should be part of the components initialize and destroy method, so that it doesn't continue to evaluate on every click event in your site/app.
To make sure its attached once across components you'll most likely need to use some novel strategy, but it could be accomplished using something like unique ids, or namespaced events.
The text was updated successfully, but these errors were encountered:
I'm working on a single page app with something like 50+ distinct pages. Only a few of them use the textcomplete component, however all click events on all pages fire the textcomplete document event handler.
There's no specific issue with the event handler performing poorly, however the design might cause memory issues. The event handler carries a reference to dropdownViews which prevents it from being garbage collected by the browser.
There's currently a bubbled event being watched on
document
that appears to be bound todocument
regardless of whether atextcomplete
component is initialized.Attaching an event handler on every bubbled click event is fairly expensive. This most likely should be part of the components
initialize
anddestroy
method, so that it doesn't continue to evaluate on every click event in your site/app.To make sure its attached once across components you'll most likely need to use some novel strategy, but it could be accomplished using something like unique ids, or namespaced events.
The text was updated successfully, but these errors were encountered: