Monitor entire document rather than the documentElement specifically
Calling document.write will replace the entire documentElement with a new one, effectively removing our mutation observers.
Differential Revision: https://phabricator.kde.org/D22642