I made a module that creates and initialises an element and returns it to the application. The application will then attach it to the DOM.
I would like to register (during initialisation) an event that is fired when the width of the element changes. I know you can use window.resize
to receive an event when the window is resized and probably also the width of the element but the width also changes when it is added to the DOM (before adding it is 0). Anyone?