Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<script type="text/javascript">
// check the initial base-uri
window.parent.postMessage({baseURI: document.baseURI, test: "initial_base_uri"}, "*");
// append a child and check the base-uri
var baseTag = document.head.appendChild(document.createElement('base'));
window.parent.postMessage({baseURI: document.baseURI, test: "changed_base_uri"}, "*");
// remove the child and check that the base-uri is back to the initial one
document.head.remove(baseTag);
window.parent.postMessage({baseURI: document.baseURI, test: "initial_base_uri"}, "*");
</script>
</body>
</html>