Bug 1049545 - use a mutation observer instead of a timeout to wait for the notification, r=mak

--HG--
extra : rebase_source : cdab7bb1fb64d167750de48ed5be92cbd0f1cd1c