Professional JavaScript for Web Developers by Matt Frisbie
Author:Matt Frisbie
Language: eng
Format: epub, azw3, pdf
ISBN: 9781119366577
Publisher: Wiley
Published: 2019-10-15T00:00:00+00:00
With the exception of NodeFilter.SHOW_ALL, you can combine multiple options using the bitwise OR operator, as shown in the following example:
let whatToShow = NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT;
The filter argument of createNodeIterator() can be used to specify a custom NodeFilter object or a function that acts as a node filter. A NodeFilter object has only one method, acceptNode(), which returns NodeFilter.FILTER_ACCEPT if the given node should be visited or NodeFilter.FILTER_SKIP if the given node should not be visited. Because NodeFilter is an abstract type, it's not possible to create an instance of it. Instead, just create an object with an acceptNode() method and pass the object into createNodeIterator(). The following code accepts only <p> elements:
let filter = { acceptNode(node) { return node.tagName.toLowerCase() == "p" ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; } }; let iterator = document.createNodeIterator(root, NodeFilter.SHOW_ELEMENT, filter, false);
Download
Professional JavaScript for Web Developers by Matt Frisbie.azw3
Professional JavaScript for Web Developers by Matt Frisbie.pdf
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.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
Deep Learning with Python by François Chollet(12563)
Hello! Python by Anthony Briggs(9911)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9794)
The Mikado Method by Ola Ellnestam Daniel Brolund(9775)
Dependency Injection in .NET by Mark Seemann(9335)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8292)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7758)
Grails in Action by Glen Smith Peter Ledbrook(7693)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7012)
Microservices with Go by Alexander Shuiskov(6780)
Practical Design Patterns for Java Developers by Miroslav Wengner(6692)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6633)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6409)
Angular Projects - Third Edition by Aristeidis Bampakos(6041)
The Art of Crafting User Stories by The Art of Crafting User Stories(5572)
NetSuite for Consultants - Second Edition by Peter Ries(5503)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5305)
Kotlin in Action by Dmitry Jemerov(5061)
