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
It is proposed to add support to the image widget for actions that are invoked on image load. We already have a load event listener for the image widget that adds the class tc-image-loaded that can be used to invoke these actions.
I have been using this feature in a subclass of the image widget and been getting a lot of mileage out of it. For example: pre-loading an image and then triggering the start of a slideshow after the image has loaded.
An alternative to consider is a more generic affordance for attaching event listeners to elements created by widgets. The EventCatcher only works for events that bubble. I do not have a feasible proposal for such a widget, a wrapper widget that attaches an event listener to a child is error prone due to the refresh cycle.
The text was updated successfully, but these errors were encountered:
It is proposed to add support to the image widget for actions that are invoked on image load. We already have a load event listener for the image widget that adds the class
tc-image-loaded
that can be used to invoke these actions.I have been using this feature in a subclass of the image widget and been getting a lot of mileage out of it. For example: pre-loading an image and then triggering the start of a slideshow after the image has loaded.
An alternative to consider is a more generic affordance for attaching event listeners to elements created by widgets. The EventCatcher only works for events that bubble. I do not have a feasible proposal for such a widget, a wrapper widget that attaches an event listener to a child is error prone due to the refresh cycle.
The text was updated successfully, but these errors were encountered: