diff --git a/index.js b/index.js index 66cdc6f..e4496ea 100644 --- a/index.js +++ b/index.js @@ -190,6 +190,11 @@ JsMutationObserver.prototype = { observe: function(target, options) { target = wrapIfNeeded(target); + var needsAttributes = options.hasOwnProperty('attributeOldValue') || options.hasOwnProperty('attributeFilter'); + if (needsAttributes && !options.hasOwnProperty('attributes')) { + options.attributes = true; + } + // 1.1 if (!options.childList && !options.attributes && !options.characterData ||