/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/html/parser-sources-srcdoc/index.js
16 строк
577 B
Sebastian Beltran
feat(html): implement asset URL rewriting for <iframe srcdoc> in HTML (#21226)
23 июн 2026, 23:33
Не верифицирован
23 июн 2026, 23:33
164a6ff
Код
Авторство
О чём код?
import page from "./page.html"; it("applies the `srcdoc` source type to iframe[srcdoc] and a custom tag/attribute", () => { expect(typeof page).toBe("string"); expect(page).toMatchSnapshot(); expect(page).not.toContain("./pixel.png"); // Built-in `<iframe srcdoc>` (kept via "..." in the sources option). expect(page).toMatch(/<iframe srcdoc="<img src="handled-pixel\.png">">/); // A custom `div[data-html]` re-using the same `srcdoc` logic via `sources`. expect(page).toMatch( /<div data-html="<img src="handled-pixel\.png">"><\/div>/ ); });