Skip to content

Commit

Permalink
Expose observer MutationObserverInit options.
Browse files Browse the repository at this point in the history
  • Loading branch information
bezborodow committed Feb 22, 2018
1 parent 61aca3c commit 573fb61
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jquery.initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
});

// Observe the target element.
observer.observe(options.target, {childList: true, subtree: true, attributes: true});
observer.observe(options.target, options.observer );
};

// Deprecated API (does not work with jQuery >= 3.1.1):
Expand All @@ -144,7 +144,8 @@
};

$.initialize.defaults = {
target: document.documentElement // Defaults observe the entire document.
target: document.documentElement, // Defaults observe the entire document.
observer: { childList: true, subtree: true, attributes: true }
}

})(jQuery);

0 comments on commit 573fb61

Please sign in to comment.