[whatwg] [web-apps] Ability to treat transparent part of element transparent to events

Jonas Sicking jonas at sicking.cc
Wed Jan 12 16:06:25 PST 2005

martijnw wrote:
 > Jim Ley wrote:
 >> Perhaps I've misunderstood what the OP was asking for then, he wants
 >> some elements to be able to simply not recieve events (ie don't
 >> participate in the bubble etc. ?)  As the only situation where partial
 >> transparency was relevant to events were pointing ones to me.
 >> And anything event related is a behavioural style.
 >> Perhaps he could clarify?
 > Well, I think you understood correctly what I meant.
 > I want some elements simply not be able to recieve events.
 > But also when an element is partly transparent, I want the transparent
 > part of it not to recieve (mouse-)events.

Having an element not recieve events at all would be a pretty big change 
to the event model since you'd change the capture and bubble phases of 
the event. What would be the use for this? Simply don't attach 
eventlisteners to the element if you're not interested in events that 
reach it. Could you describe a usecase please.

However making elements, or parts of them not be considered when it 
comes to finding what event to target when a certain pixel is targeted 
in a visual renderer I can understand. Especially treating transparent 
parts as 'not there' can be usefull. Is this maybe what you ment? If so 
I do indeed think the SVG css-properties would be a good starting point, 
though at least some of them needs to be done a little less SVG-ish.

I don't really know enough about how screenreaders or speech UAs work to 
say if this would be usefull to them, or how it would work.

Note though that transparent parts can be tricky when it comes to text. 
You probably don't want just the actual drawn pixels of the text to be 
clickable, but rather the general area that is covered by text. This 
'general area' needs to be defined though.

Also, I'm not sure if the WHATWG mailing list is the appropriate forum. 
This more sounds like something for the w3c CSS WG or the DOM-Events WG. 
Unfortunatly I don't think the DOM-Events WG (nor any other DOM WG) 
exists any more.

/ Jonas Sicking

More information about the whatwg mailing list