1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <!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$cb$(function (amber) {amber.globals.Browser._open();});">
- Start legacy in-page IDE
- </button>
- <button id="starthelios" disabled type="button"
- onclick="a$cb$(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="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;
- var a$cb$;
- (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) {
- a$cb$ = function (action) {
- action(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.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>
|