@@ -8,6 +8,17 @@ Elm.debuggerAttach = function(module) {
88 make: function(runtime) {
99 var wrappedModule = debugModule(module, runtime);
1010 Elm.Debugger = debuggerInit(wrappedModule, runtime);
11+ if (parent.window) {
12+ var dispatch = function(_) {
13+ parent.window.postMessage("elmDebuggerInit", window.location.origin);
14+ };
15+ if (parent.window.document.readyState === "complete") {
16+ dispatch();
17+ }
18+ else {
19+ parent.window.addEventListener("load", dispatch);
20+ }
21+ }
1122 return wrappedModule.moduleInstance;
1223 }
1324 };