Open michaelobriena opened 9 years ago
If it is not there on page load, we should at least have an API for the embed script to do the embedding.
I faced the performance issues of mutation events.
they have changed in DOM 4 to mutation observers
https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver (https://www.youtube.com/watch?v=eRZ4pO0gVWw)
Solved with mutation observer (DOM 4).
Design: observe the document body (children and subtree) and if a valid "famous-container" element node is mutating (added), fire the embed's manage function for them.
http://plnkr.co/edit/O10LY5?p=preview
Tested in chrome 43, FF 38.
Still doesn't work in IE11 because "promise is undefined" (not related to this issue. maybe a new issue for this is required) error in bundle.js 346 of my plunkr.
Copied from:
https://github.com/Famous/engine/issues/193