Source code

Revision control

Other Tools

<!DOCTYPE html>
<meta charset="utf-8">
<title>iframe wrapper for the console custom page</title>
<style type="text/css">
html, body {
height: 100%;
width: 100%;
iframe {
border-style: none;
height: 100%;
position: absolute;
width: 100%;
// Test parameters are passed to this page via url parameters.
// Create the iframe URL from the current URL to preserve the parameters.
const searchParamsEncoded =;
const searchParams = new URLSearchParams(searchParamsEncoded);
const domains = searchParams.get("domains");
// We append a number of iframes equal to the number of domains.
// The first iframe has a domain with the same site as the damp top frame (
// Second and subsequent iframes switch to a different-site URL (eg
for (let d = 0; d < domains; d++) {
const domain = d ? `damp.iframe${d}.com` : ``;
const iframeSrc = `http://${domain}/tests/devtools/addon/content/pages/custom/console/iframe.html${searchParamsEncoded}`;
const iframe = document.createElement("iframe");
iframe.setAttribute("src", iframeSrc);