DOM recording for web application demos
robert.ocallahan.org
robert.ocallahan.org
The infrastructure we built to support JS would extend pretty easily to Python. Extending to Java would be a lot more work. No plans to do either anytime soon (unless someone wants to pay us significant money for that).
https://www.usenix.org/conference/nsdi10-0/mugshot-determini...
Mickens has done subsequent work on web page load times with Ravi Netravali.
After that it might Just Work since the ARIA roles are in the DOM. Indeed it would be very cool!
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!
(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.
Additionally, the need to add fake CSS pseudo classes to get it to work with focus, etc. seems like a bummer.
Nonetheless, seems like a nice compact way to make and share demos, so well done!
This problem inspired me to build https://RecordOnce.com which does the re-recording automatically and periodically.
For the initial recording we also uses rrweb. (Can't wait to get us on the rrweb donor/supporter list!)
Example video that was completely generated by the bot: https://video.recordonce.com/play/dBZ66RussA8
We don't, because we don't need to update the demo movies often so it saves cycle time to trigger updates manually when required.
On the other hand, if you have an SPA[0] that renders as little as possible, I'd say, go wild :)
[0]: I understand DOM size should be orthogonal to your rendering method but "In Real World (c)", that's usually not the case for some reason.
Mutation events are what kills performance, not mutation observers.