Replace non-standard document.all method.