1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <!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"
- onclick="a$gl$ifReady(function (amber) {amber.globals.Browser._open();});">
- Start legacy in-page IDE
- </button>
- <button id="starthelios" disabled type="button"
- onclick="a$gl$ifReady(function (amber) {amber.popupHelios();});">
- Popup Helios IDE
- </button>
- </div>
- <div>
- <span id="loadingKernel">Loading Amber kernel ... </span>
- <span id="initializingKernel">initializing Amber kernel ... </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;
- var a$gl$ifReady = (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 loadingTheRest = messageBox.removeChild(document.getElementById("loadingTheRest"));
- var done = messageBox.removeChild(document.getElementById("done"));
- var loadAll;
- require(["require", "amber/es6-promise"], function (require, promiseLib) {
- promiseLib.polyfill();
- require(["amber/boot", "amber/deploy", "amber_core/Platform-Browser"], function (_, amber) {
- messageBox.appendChild(initializingKernel);
- loadAll = amber.initialize({'transport.defaultAmdNamespace': "amber_core"})
- .then(function () {
- messageBox.appendChild(loadingTheRest);
- return new Promise(function (resolve, reject) {
- require(["amber/devel", "amber/legacy/IDE", "amber/web/Web", "amber/legacy/Benchfib", "helios/all", "amber_cli/AmberCli"], resolve, reject);
- });
- })
- .then(function () {
- amber.globals.Smalltalk._postLoad();
- messageBox.appendChild(done);
- return amber;
- });
- startLegacy.disabled = startHelios.disabled = false;
- });
- });
- return function (action) {
- startLegacy.disabled = startHelios.disabled = true;
- loadAll.then(function (amber) {
- startLegacy.disabled = startHelios.disabled = false;
- action(amber);
- });
- };
- })();
- </script>
- </body>
- </html>
|