4 ms·
How do you handle CSSOM changes which don’t generate mutation events? I wrote a similar library and this was a pain for react-native-web apps, eg Twitter. Nes
by ed 6y ago
How do you handle CSSOM changes which don’t generate mutation events?
I wrote a similar library and this was a pain for react-native-web apps, eg Twitter.
Nested iframes were also an issue, since the recording script needs to run in a context with access to all frames, in all origins. (IIRC you have to disable site-per-process in Chrome, at a minimum.)
Edit: I should add, very nice work and thanks for open sourcing!
- roca 6y agoDOMRec doesn't handle dynamic changes to rules in CSS stylesheets because our app doesn't do that. If we needed to do that, I'd try wrapping the CSSOM API prototypes. (Of course DOMRec does handle changes to 'style' attributes on DOM nodes, because those do generate mutation notifications.) Similarly, DOMRec doesn't handle cross-origin frames, because our app doesn't use them. To make that work I guess we'd have to port to a browser extension and even so it would make things quite a lot harder.