helpers.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. define("amber/helpers", ["amber_vm/smalltalk", "amber_vm/globals", "require"], function (vm, globals, require) {
  2. var exports = Object.create(globals);
  3. // API
  4. exports.popupHelios = function () {
  5. window.open(require.toUrl('amber_helios/html/helios.html'), "Helios", "menubar=no, status=no, scrollbars=no, menubar=no, width=1000, height=600");
  6. };
  7. Object.defineProperty(exports, "vm", {
  8. value: vm,
  9. enumerable: true, configurable: true, writable: false
  10. });
  11. Object.defineProperty(exports, "globals", {
  12. value: globals,
  13. enumerable: true, configurable: true, writable: false
  14. });
  15. // Backward compatibility, deprecated
  16. Object.defineProperty(exports, "smalltalk", {
  17. value: vm,
  18. enumerable: true, configurable: true, writable: false
  19. });
  20. exports.defaultAmdNamespace = null;
  21. exports.initialize = function () {
  22. console.warn("smalltalk.defaultAmdNamespace is deprecated. Please use smalltalk.vm.defaultAmdNamespace instead.");
  23. console.warn("smalltalk.initialize is deprecated. Please use smalltalk.vm.initialize instead.");
  24. console.warn("smalltalk.ClassName is deprecated. Please use smalltalk.globals.ClassName instead.");
  25. vm.defaultAmdNamespace = exports.defaultAmdNamespace || vm.defaultAmdNamespace;
  26. return vm.initialize();
  27. };
  28. // Exports
  29. return exports;
  30. });