Prinzhorn / scrollmeister

Open-source JavaScript framework to declaratively build scrolling experiences
https://www.scrollmeister.com/
MIT License
37 stars 5 forks source link

MutationObserver #22

Closed Prinzhorn closed 6 years ago

Prinzhorn commented 6 years ago

E.g. the gallery behavior needs to be updated when an image is added/removed or the width/height attribute of an image is changed. Other are likely affected as well. The gl-effects is currently polling the source (also to track playing video). fluid-text also does currently not react at all if the text changes.

Support is pretty good (IE 11 has it and Android 4.4). However, since we will abstract this anyway in Behavior.js we can likely easily fall back to Mutation Events without needing a complete polyfill.

Prinzhorn commented 6 years ago

Test cases

  1. reordering / adding images in the gallery behavior
  2. changing the text in a fluid-text behavior