-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
data-env="development" and event.data.html
- Loading branch information
1 parent
5d6a053
commit a8caa00
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>LiveCodes Compiler Sandbox</title> | ||
<script id="message-script" data-env="development"> | ||
window.addEventListener('message', function (event) { | ||
if (event.data.type === 'init' && event.data.scriptUrl) { | ||
var script = document.createElement('script'); | ||
script.src = event.data.scriptUrl; | ||
script.onload = function () { | ||
initCompiler(event.data); | ||
}; | ||
document.head.appendChild(script); | ||
} | ||
}); | ||
</script> | ||
</head> | ||
<body></body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<script id="message-script" data-env="development"> | ||
window.addEventListener('message', function (event) { | ||
var html = event.data.result || event.data.html; | ||
if (html) { | ||
document.write(html); | ||
document.close(); | ||
} | ||
}); | ||
</script> | ||
</head> | ||
<body></body> | ||
</html> |