Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: site/try/iframe.js

Issue 2232273004: Delete site/try (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 function dartPrint(msg) {
6 window.parent.postMessage(String(msg), "*");
7 }
8
9 window.onerror = function (message, url, lineNumber) {
10 window.parent.postMessage(
11 ["error", {message: message, url: url, lineNumber: lineNumber}], "*");
12 };
13
14 function onMessageReceived(event) {
15 var data = event.data;
16 if (data instanceof Array) {
17 if (data.length == 2 && data[0] == 'source') {
18 var script = document.createElement('script');
19 script.innerHTML = data[1];
20 script.type = 'application/javascript';
21 document.head.appendChild(script);
22 return;
23 }
24 }
25 }
26
27 window.addEventListener("message", onMessageReceived, false);
28
29 (function () {
30 function postScrollHeight() {
31 window.parent.postMessage(
32 ["scrollHeight", document.documentElement.scrollHeight], "*");
33 }
34
35 var mutationObserverConstructor =
36 window.MutationObserver ||
37 window.WebKitMutationObserver ||
38 window.MozMutationObserver;
39
40 var observer = new mutationObserverConstructor(function(mutations) {
41 postScrollHeight()
42 window.setTimeout(postScrollHeight, 500);
43 });
44
45 observer.observe(
46 document.body,
47 { attributes: true,
48 childList: true,
49 characterData: true,
50 subtree: true });
51 })();
OLDNEW
« dart.gyp ('K') | « site/try/iframe.html ('k') | site/try/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698