Perhaps this is an edge case that I am seeing, but if the element has a defined height and width, the object DOM node will not detect a difference, and consequently will not trigger an event.
In this example, you can see that the root element has a height of 212px. When the parent div (not shown in this example) is dragged and resized, because the 'panel' div already has a height associated with it, it will not trigger an event.
I'd like to propose a solution: attach the object DOM node into the parentNode of the element:
// https://github.com/KyleAMathews/element-resize-event/blob/master/index.js#L73
element.parentNode.appendChild(obj) // line 78 & line 73
Here is what the DOM would look like after the change:
Perhaps this is an edge case that I am seeing, but if the element has a defined height and width, the object DOM node will not detect a difference, and consequently will not trigger an event.
Here is what my DOM node looks like:
In this example, you can see that the root element has a height of 212px. When the parent div (not shown in this example) is dragged and resized, because the 'panel' div already has a height associated with it, it will not trigger an event.
I'd like to propose a solution: attach the object DOM node into the parentNode of the element:
Here is what the DOM would look like after the change:
Here is a screenshot with current implementation: