bubbles Event Attribute
Complete Event Object Reference
Definition and Usage
The bubbles event attribute returns a Boolean value that indicates whether or not the event is a bubbling
event.
Event bubbling directs an event to its intended target, it works like this:
- A button is clicked and the event is directed to the button
- If an event handler is set for that object, the event is triggered
- If no event handler is set for that object, the event bubbles up (like a
bubble in water) to the objects parent
The event bubbles up from parent to parent until it is handled, or until it
reaches the document object.
Syntax
Example
The following example checks if the triggered event is a bubbling event:
<html>
<head>
<script type="text/javascript">
function getEventType(event)
{
alert(event.bubbles);
}
</script>
</head>
<body onmousedown="getEventType(event)">
<p>Click somewhere in the document.
An alert box will tell if the
event is a bubbling event.</p>
</body>
</html>
|
Try-It-Yourself Demos
Check
if an event is a bubbling event
Complete Event Object Reference
The Altova MissionKit is a suite of intelligent XML tools, including:
XMLSpy® – industry-leading XML editor
- Support for all XML-based technologies
- Graphical editing views, powerful debuggers, code generation, & more
MapForce® – graphical data mapping tool
- Drag-and-drop data conversion with code generation
- Support for XML, DBs, EDI, Excel® 2007, text, Web services
StyleVision® – visual stylesheet designer
- Drag-and-drop stylesheet design for XML & databases
- Output to HTML, PDF, RTF, Word 2007, & more
And more…
Try before you buy with a free fully functional 30-day trial
Download today
|