Pro JavaScript Techniques by John Resig Russ Ferguson & John Paxton
Author:John Resig, Russ Ferguson & John Paxton
Language: eng
Format: epub
Publisher: Apress, Berkeley, CA
With the ability to stop the event bubbling, you now have complete control over which elements can see and handle an event. This is a fundamental tool necessary for exploring the development of dynamic web applications. The final aspect is to cancel the default action of the browser, allowing you to completely override what the browser does and implement new functionality instead.
Overriding the Browser’s Default Action
For most events that take place, the browser has some default action that will always occur. For example, clicking an <a> element will take you to its associated web page; this is a default action in the browser. This action will always occur after both the capturing and the bubbling event phases, as shown in Figure 6-3, which illustrates the results of a user clicking an <a> element in a web page. The event begins by traveling through the DOM in both a capturing and bubbling phase (as discussed previously). However, once the event has finished traversing, the browser attempts to execute the default action for that event and element. In this case, it’s visiting the / web page.
Figure 6-3.The full life cycle of an event
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12585)
Hello! Python by Anthony Briggs(9924)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9799)
The Mikado Method by Ola Ellnestam Daniel Brolund(9783)
Dependency Injection in .NET by Mark Seemann(9347)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8308)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7770)
Grails in Action by Glen Smith Peter Ledbrook(7703)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7564)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7134)
Microservices with Go by Alexander Shuiskov(6896)
Practical Design Patterns for Java Developers by Miroslav Wengner(6813)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6755)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6422)
Angular Projects - Third Edition by Aristeidis Bampakos(6171)
The Art of Crafting User Stories by The Art of Crafting User Stories(5695)
NetSuite for Consultants - Second Edition by Peter Ries(5624)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5437)
Kotlin in Action by Dmitry Jemerov(5071)
