* inline stylesheets when loaded * set empty link elements to loaded by default * Clean up stylesheet manager * Remove attribute mutation code * Update packages/rrweb/test/record.test.ts * Update packages/rrweb/test/record.test.ts * Update packages/rrweb/test/record.test.ts * Update packages/rrweb/scripts/repl.js * Update packages/rrweb/test/record.test.ts * Update packages/rrweb/src/record/index.ts * Add todo * Move require out of time sensitive assert * Add waitForRAF, its more reliable than waitForTimeout * Remove flaky tests * Add recording stylesheets in iframes * Remove variability from flaky test * Make test more robust * Fix naming * Add test cases for inlineImages * Add test cases for inlineImages * Record iframe mutations cross page * Test: should record images inside iframe with blob url after iframe was reloaded * Handle negative ids in rrdom correctly When iframes get inserted they create untracked elements, both on the dom and rrdom side. Because they are untracked they generate negative numbers when fetching the id from mirror. This creates a problem when comparing and fetching ids across mirrors. This commit tries to get away from using negative ids as much as possible in rrdom's comparisons * Update packages/rrdom/src/diff.ts Co-authored-by: Yun Feng <yun.feng@anu.edu.au> * Start unserialized nodes at -2 This way we don't accidentally think of them as mirror misses * Set unserialized id starting number at -2 * Remove duplication Co-authored-by: Yun Feng <yun.feng@anu.edu.au>
17 lines
475 B
HTML
17 lines
475 B
HTML
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<body>
|
|
<img src="" alt="This is a robot" />
|
|
</body>
|
|
<script>
|
|
setTimeout(async function () {
|
|
const robotFile = await fetch('/images/robot.png');
|
|
const robotBlob = await robotFile.blob();
|
|
const robotBlobUrl = URL.createObjectURL(robotBlob);
|
|
const images = document.querySelectorAll('img');
|
|
images.forEach((img) => {
|
|
img.src = robotBlobUrl;
|
|
});
|
|
}, 0);
|
|
</script>
|
|
</html>
|