Skip to content

Commit

Permalink
Test to allow opening on the top frame
Browse files Browse the repository at this point in the history
  • Loading branch information
OyvindMathisen committed Dec 1, 2023
1 parent 81083b9 commit d08da37
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions iframe-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@ function launch() {
const inputElement = document.getElementById("launch-link-input");
const input = inputElement.value;
window.location.assign(input);
}

function launchTop() {
const inputElement = document.getElementById("launch-link-input");
const input = inputElement.value;
window.top.location.assign(input);
}
3 changes: 2 additions & 1 deletion iframe-content.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<script src="iframe-app.js" type="text/javascript"></script>
<label for="launch-link-input">Launch Link: </label>
<input id="launch-link-input" type="text">
<button onclick="launch()">Launch!!!</button>
<button onclick="launch()">Launch</button>
<button onclick="launchTop()">Launch V2</button>
</body>
</html>

0 comments on commit d08da37

Please sign in to comment.