Bug 944847, don't try to compile event handlers for data documents, r=bz

--HG--
extra : rebase_source : 2b4ce65fad2433475f4b50ccd89b4301cee6c8b2