Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Looking at the documentation for the Extension API's mounted() and paint() methods, both say the following:
$element
jQuery wrapper containing the HTML element where visualization should be rendered.
but the $element received by each are different. Based upon the documentation, I would expect them to be the same. What am I missing?
Different wrappers around the same element? Or different elements?
It appears to me to be different elements (a sub-element) to be precise.
The first of which returns the yellow div below and the second returns the green div.
For completeness, here is the code I'm using:
mounted: function ($element) {
console.log("mounted");
console.log($element);
},
paint: function ($element) {
console.log("paint");
console.log($element);
Interesting. Looks like you are right. I don't use mounted much, in most cases I need the layout, which for some reason is not a parameter to mounted.