Re: about attachEvent() and detachEvent()
- From: Thomas 'PointedEars' Lahn <PointedEars@xxxxxx>
- Date: Sun, 13 Jan 2008 16:39:47 +0100
stanleyxu wrote:
I try to write a script to fix context-menu-hijack.
[...]
But when it is hijacked by "document.attachEvent('oncontextmenu',
hijack)", the previou fixes doesn't work any more.
Is it possible to detach all attached event handler from an event, even
when the name of those event handlers are unknown?
It is not event handlers that are attached, but event listeners. Event
handlers are intrinsic immutable parts of the DOM that execute attached
event listeners in specified order.
I am afraid it is not possible to detach an event listener from an object if
you don't have a reference to that. Determining a reference at runtime is
generally possible with source code parsing, however the reference can be
obfuscated by the offending script-kiddie just as easily.
Nevertheless, there are a number of other ways to work around context-menu
hijacking, with disabling script support being only one of them.
PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
.
- Follow-Ups:
- Re: about attachEvent() and detachEvent()
- From: stanleyxu
- Re: about attachEvent() and detachEvent()
- References:
- about attachEvent() and detachEvent()
- From: stanleyxu
- about attachEvent() and detachEvent()
- Prev by Date: Re: Script.aculo.us Sortable lists, multiple containment, with limits.
- Next by Date: Re: introduction to programming
- Previous by thread: about attachEvent() and detachEvent()
- Next by thread: Re: about attachEvent() and detachEvent()
- Index(es):
Relevant Pages
|
Loading