document.write's insertion node is now recorded, added some NS_ASSERTIONS in catch clause