@@ -8,34 +8,24 @@ if (!window.location.origin) {
8 (window.location.port ? (':' + window.location.port) : '');
8 (window.location.port ? (':' + window.location.port) : '');
12−Elm.debuggerAttach = function(module, hotSwapState /* =undefined */) {
11+Elm.fullscreenDebugHooks = function(module, hotSwapState /* =undefined */) {
13− return {
12+ var exposedDebugger = {};
13+ function debuggerAttach(module, hotSwapState) {
14− make: function(runtime) {
15+ make: function(runtime) {
15− var wrappedModule = debugModule(module, runtime);
16+ var wrappedModule = debugModule(module, runtime);
16− Elm.Debugger = debuggerInit(wrappedModule, runtime, hotSwapState);
17+ exposedDebugger = debuggerInit(wrappedModule, runtime, hotSwapState);
17− dispatchElmDebuggerInit();
18− return wrappedModule.debuggedModule;
18+ return wrappedModule.debuggedModule;
22+ var mainHandle = Elm.fullscreen(debuggerAttach(module,hotSwapState));
23+ mainHandle.debugger = exposedDebugger;
23var EVENTS_PER_SAVE = 100;
27var EVENTS_PER_SAVE = 100;
25−function dispatchElmDebuggerInit() {
27− var dispatch = function() {
28− parent.window.postMessage("elmDebuggerInit", window.location.origin);
30− if (parent.window.document.readyState === "complete") {
34− parent.window.addEventListener("load", dispatch);
39function debugModule(module, runtime) {
29function debugModule(module, runtime) {
40 var programPaused = false;
30 var programPaused = false;
41 var recordedEvents = [];
31 var recordedEvents = [];