Skip to content

Commit

Permalink
Workaround WebKit differences with load events & document.open
Browse files Browse the repository at this point in the history
This is with regards to https://bugs.webkit.org/show_bug.cgi?id=245719
which is incidental in these tests, and almost certainly covered by
existing tests.
  • Loading branch information
gsnedders committed Nov 10, 2022
1 parent b728032 commit 69475a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions import-maps/data-driven/resources/test-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ function createTestIframe(importMap, importMapBaseURL) {
iframe.src = 'data:text/html;base64,' + btoa(testHTML);
} else {
iframe.src = '/common/blank.html';
iframe.onload = () => {
iframe.addEventListener('load', () => {
iframe.contentDocument.write(testHTML);
iframe.contentDocument.close();
};
}, {once: true});
}
document.body.appendChild(iframe);
});
Expand Down

0 comments on commit 69475a9

Please sign in to comment.