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

Unified Diff: site/try/src/run.dart

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 side-by-side diff with in-line comments
Download patch
Index: site/try/src/run.dart
diff --git a/site/try/src/run.dart b/site/try/src/run.dart
deleted file mode 100644
index e453a7015bccf9bdeb3f965dd7cb4299f0932392..0000000000000000000000000000000000000000
--- a/site/try/src/run.dart
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library trydart.run;
-
-import 'dart:html' show
- Blob,
- IFrameElement,
- Url;
-
-makeOutputFrame(String scriptUrl) {
- final String outputHtml = '''
-<!DOCTYPE html>
-<html lang="en">
-<head>
-<title>JavaScript output</title>
-<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
-</head>
-<body>
-<script type="application/javascript" src="$outputHelper"></script>
-<script type="application/javascript" src="$scriptUrl"></script>
-</body>
-</html>
-''';
-
- return new IFrameElement()
- ..src = Url.createObjectUrl(new Blob([outputHtml], "text/html"))
- ..style.width = '100%'
- ..style.height = '0px';
-}
-
-final String outputHelper =
- Url.createObjectUrl(new Blob([OUTPUT_HELPER], 'application/javascript'));
-
-const String OUTPUT_HELPER = r'''
-function dartPrint(msg) {
- // Send a message to the main Try Dart window.
- window.parent.postMessage(String(msg), "*");
-}
-
-function dartMainRunner(main) {
- // Store the current height (of an empty document). This implies that the
- // main Try Dart application is only notified if the document is actually
- // changed.
- var previousScrollHeight = document.documentElement.scrollHeight;
-
- function postScrollHeight(mutations, observer) {
- var scrollHeight = document.documentElement.scrollHeight;
- if (scrollHeight !== previousScrollHeight) {
- previousScrollHeight = scrollHeight;
- window.parent.postMessage(["scrollHeight", scrollHeight], "*");
- }
- }
-
- var MutationObserver =
- window.MutationObserver ||
- window.WebKitMutationObserver ||
- window.MozMutationObserver;
-
- // Listen to any changes to the DOM.
- new MutationObserver(postScrollHeight).observe(
- document.documentElement,
- { attributes: true,
- childList: true,
- characterData: true,
- subtree: true });
-
- main();
-}
-''';
« dart.gyp ('K') | « site/try/src/mock.dart ('k') | site/try/src/samples.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698