scrollsnap-polyfill icon indicating copy to clipboard operation
scrollsnap-polyfill copied to clipboard

Does not support polyfilling elements dynamically added (SPA)

Open uniqname opened this issue 8 years ago • 1 comments

It appears that if elements are added after the polyfill initializes (such as in a Single Page App) those elements do not get the polyfill support.

EDIT: This may be an issue with Polyfill.js. I haven't looked deep enough yet.

uniqname avatar Nov 09 '16 22:11 uniqname

I've implemented it and you are right, but it's just a matter of re-inserting the polyfill's JS or re-execuiting it's function just after loading your new content, as it works only over elements already loaded to DOM when it's being applied, that's why ot must be inserted at the end.

davidtaubmann avatar Dec 06 '16 02:12 davidtaubmann