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

Unified Diff: dart/site/try/iframe.js

Issue 126003002: Address comments from CL 125123002 and additional cleanup. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update copyright year. Created 6 years, 11 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
« no previous file with comments | « dart/site/try/extracted_themes.dart ('k') | dart/site/try/leap.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/site/try/iframe.js
diff --git a/dart/site/try/iframe.js b/dart/site/try/iframe.js
index 5547e734ca527bdf337ceef5d47cf34ddef66d10..d1460fd6a3e623f4daea91df507a11ddcd4be43f 100644
--- a/dart/site/try/iframe.js
+++ b/dart/site/try/iframe.js
@@ -27,19 +27,25 @@ function onMessageReceived(event) {
window.addEventListener("message", onMessageReceived, false);
(function () {
-function postScrollHeight() {
- window.parent.postMessage(["scrollHeight", document.documentElement.scrollHeight], "*");
-}
+ function postScrollHeight() {
+ window.parent.postMessage(
+ ["scrollHeight", document.documentElement.scrollHeight], "*");
+ }
+
+ var mutationObserverConstructor =
+ window.MutationObserver ||
+ window.WebKitMutationObserver ||
+ window.MozMutationObserver;
+
+ var observer = new mutationObserverConstructor(function(mutations) {
+ postScrollHeight()
+ window.setTimeout(postScrollHeight, 500);
+ });
-var observer = new (window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver)(function(mutations) {
- postScrollHeight()
- window.setTimeout(postScrollHeight, 500);
-});
-
-observer.observe(
- document.body,
- { attributes: true,
- childList: true,
- characterData: true,
- subtree: true });
+ observer.observe(
+ document.body,
+ { attributes: true,
+ childList: true,
+ characterData: true,
+ subtree: true });
})();
« no previous file with comments | « dart/site/try/extracted_themes.dart ('k') | dart/site/try/leap.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698