| 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 });
|
| })();
|
|
|