1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <!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 () {
- amber.beClean();
- messageBox.appendChild(done);
- });
- });
- });
- })();
- </script>
- </body>
- </html>
|