fix: inline images onload (#1174)
* fix: inline images onload * add integration test case * Apply formatting changes * Create small-olives-arrive.md --------- Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
This commit is contained in:
@@ -303,6 +303,28 @@ iframe.contentDocument.querySelector('center').clientHeight
|
||||
)) as string;
|
||||
assert(snapshot.includes('-webkit-background-clip: text;'));
|
||||
});
|
||||
|
||||
it('images with inline onload should work', async () => {
|
||||
const page: puppeteer.Page = await browser.newPage();
|
||||
|
||||
await page.goto(
|
||||
'http://localhost:3030/html/picture-with-inline-onload.html',
|
||||
{
|
||||
waitUntil: 'load',
|
||||
},
|
||||
);
|
||||
await page.waitForSelector('img', { timeout: 1000 });
|
||||
await page.evaluate(`${code}var snapshot = rrweb.snapshot(document, {
|
||||
dataURLOptions: { type: "image/webp", quality: 0.8 },
|
||||
inlineImages: true,
|
||||
inlineStylesheet: false
|
||||
})`);
|
||||
await waitForRAF(page);
|
||||
const fnName = (await page.evaluate(
|
||||
'document.querySelector("img").onload.name',
|
||||
)) as string;
|
||||
assert(fnName === 'onload');
|
||||
});
|
||||
});
|
||||
|
||||
describe('iframe integration tests', function (this: ISuite) {
|
||||
|
||||
Reference in New Issue
Block a user