I'm trying to use a MutationObserver to observe when a span changes height (when the text inside of the span changes size). But no mutations seem to be raised, even though inspecting the span's offsetHeight property does show a change. Are property changes not observed?
let mutationobserverconfig = {
attributes: true,
childList: true,
subtree: true
};
function onmutation(mutations) {
for (let mutation of mutations) {
log("resizemutationobserver");
// for
}
// onmutation
}
let resizemutationobserver;
function addresizemutationobserver(element, callback) {
// callback is in the module using this function
resizemutationobserver = new MutationObserver(onmutation);
let targetnode = $(element)[0];
resizemutationobserver.observe(targetnode, mutationobserverconfig); //
}