From 5cb4b5f93bb8854748a0317f2f38b34add528a56 Mon Sep 17 00:00:00 2001 From: Hiroyuki Inoue Date: Mon, 26 Jun 2017 15:40:21 -0700 Subject: [PATCH] Find compatibility of MutationObserver. Don't observe, if not found --- app/assets/javascripts/kuroko2/instance_linker.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/kuroko2/instance_linker.js b/app/assets/javascripts/kuroko2/instance_linker.js index fd61c3a5..a31b90eb 100644 --- a/app/assets/javascripts/kuroko2/instance_linker.js +++ b/app/assets/javascripts/kuroko2/instance_linker.js @@ -1,4 +1,8 @@ jQuery(function ($) { + var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; + if (!MutationObserver) { + return; + } var logParent = document.querySelector('#logs tbody'); var observer = new MutationObserver(function(mutations) { if (mutations.some(function(m) {