12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title>Amber Smalltalk</title>
- <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
- <meta name="author" content="Nicolas Petton"/>
- <script type='text/javascript' src='node_modules/requirejs/require.js'></script>
- <script type='text/javascript' src='config.js'></script>
- </head>
- <body>
- <div>
- <button id="startlegacy" disabled type="button">Start legacy in-page IDE</button>
- <button id="starthelios" disabled type="button">Popup Helios IDE</button>
- </div>
- <div>
- <span id="loadingKernel">Loading Amber kernel ... </span>
- <span id="initializingKernel">initializing Amber kernel ... </span>
- <span id="loadingIdeSupport">loading IDE support ... </span>
- <span id="loadingTheRest">loading rest of development image ... </span>
- <span id="done">done.</span>
- </div>
- <script type='text/javascript'>
- "use strict";
- var global = typeof global === "undefined" ? window : global || window;
- (function () {
- var startLegacy = document.getElementById("startlegacy");
- var startHelios = document.getElementById("starthelios");
- var messageBox = document.getElementById("loadingKernel").parentNode;
- var initializingKernel = messageBox.removeChild(document.getElementById("initializingKernel"));
- var loadingIdeSupport = messageBox.removeChild(document.getElementById("loadingIdeSupport"));
- var loadingTheRest = messageBox.removeChild(document.getElementById("loadingTheRest"));
- var done = messageBox.removeChild(document.getElementById("done"));
- require(["require", "amber/es6-promise"], function (require, promiseLib) {
- promiseLib.polyfill();
- require(["amber/boot", "amber/deploy", "amber_core/Platform-Browser"], function (_, amber) {
- messageBox.appendChild(initializingKernel);
- amber.initialize({'transport.defaultAmdNamespace': "amber_core"})
- .then(function () {
- messageBox.appendChild(loadingIdeSupport);
- return amber.loadPackages(["amber/lang", "amber/legacy/IDE", "amber_core/SUnit"]);
- })
- .then(function () {
- startLegacy.addEventListener('click', function () {
- amber.globals.Browser._open();
- });
- startHelios.addEventListener('click', function () {
- amber.popupHelios();
- });
- startLegacy.disabled = startHelios.disabled = false;
- messageBox.appendChild(loadingTheRest);
- return amber.loadPackages(["amber/devel", "amber/legacy/Benchfib", "helios/all", "amber_cli/AmberCli"]);
- })
- .then(function () {
- messageBox.appendChild(done);
- });
- });
- });
- })();
- </script>
- </body>
- </html>
|