Will fail to fire (as would I if you included this at the end of your document, probably) as the nodes already exist - so they aren't being treated 'as parsed'. I think I added this this way and just never added the workarounds.... But.... I think the simplest one is to actually just not use a mutationobserver directly at all and make use of the slotchange event which seems to happen regardless, consistently... Maybe we should switch to use that? Something kinda like this https://glitch.com/edit/#!/mathml-examples?path=js/elements/la-tex.js:21:5 (though, obvs we'd rework a little to include attrs correctly too here?) The above snip will work if you try it in the console on https://mathml-examples.glitch.me/foundation-expansion.html
I was thinking the other day that the observer model is kind of flawed for custom elements because the lifecycle is so wonky... for example, currently
Will fail to fire (as would I if you included this at the end of your document, probably) as the nodes already exist - so they aren't being treated 'as parsed'. I think I added this this way and just never added the workarounds.... But.... I think the simplest one is to actually just not use a mutationobserver directly at all and make use of the slotchange event which seems to happen regardless, consistently... Maybe we should switch to use that? Something kinda like this https://glitch.com/edit/#!/mathml-examples?path=js/elements/la-tex.js:21:5 (though, obvs we'd rework a little to include attrs correctly too here?) The above snip will work if you try it in the console on https://mathml-examples.glitch.me/foundation-expansion.html
If we want I can work this up and send a pull...