Skip to content

Commit

Permalink
Find compatibility of MutationObserver. Don't observe, if not found
Browse files Browse the repository at this point in the history
  • Loading branch information
inohiro committed Jun 27, 2017
1 parent c8f6d42 commit 5cb4b5f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/assets/javascripts/kuroko2/instance_linker.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down

0 comments on commit 5cb4b5f

Please sign in to comment.