<!DOCTYPE html>
<html>
<title>page with frame csp</title>
<script>
function addIframe() {
const frame = document.createElement('iframe');
frame.name = 'added-by-page';
frame.src = `http://cross-origin.com:${location.port}` +
'/extensions/csp/success.html';
return new Promise(resolve => {
frame.onload = () => { resolve(true); };
document.body.appendChild(frame);
});
}
</script>
</html>