UNPKG

siesta-lite

Version:

Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers

107 lines (83 loc) 3.29 kB
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>The source code</title> <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="../resources/prettify/prettify.js"></script> <style type="text/css"> .highlight { display: block; background-color: #ddd; } </style> <script type="text/javascript"> function highlight() { document.getElementById(location.hash.replace(/#/, "")).className = "highlight"; } </script> </head> <body onload="prettyPrint(); highlight();"> <pre class="prettyprint lang-js">/* Siesta 5.6.1 Copyright(c) 2009-2022 Bryntum AB https://bryntum.com/contact https://bryntum.com/products/siesta/license */ <span id='global-property-'>/** </span> */ Class(&#39;Ariadne.DomQueryFinder&#39;, { isa : Ariadne.QueryFinder, does : Ariadne.DomQueryFinder.TreeWalker, has : { uniqueDomNodeProperty : null, shouldIgnoreDomElementId : null, ignoreCssClasses : null }, methods : { initRecognizers : function () { }, initIdentifiers : function () { this.addIdentifier(new Ariadne.DomQueryFinder.Identifier.Id({ uniqueDomNodeProperty : this.uniqueDomNodeProperty, shouldIgnoreDomElementId : this.shouldIgnoreDomElementId, finder : this, priority : 10000 })) this.addIdentifier(new Ariadne.DomQueryFinder.Identifier.CssClass({ ignoreCssClasses : this.ignoreCssClasses, finder : this, priority : 1000 })) this.addIdentifier(new Ariadne.DomQueryFinder.Identifier.Contains({ finder : this, priority : 1000 })) this.addIdentifier(new Ariadne.DomQueryFinder.Identifier.AttributeValue({ finder : this, priority : 1000 })) this.addIdentifier(new Ariadne.DomQueryFinder.Identifier.TagName({ finder : this, priority : 100 })) this.addIdentifier(new Ariadne.DomQueryFinder.Identifier.NthOfType({ finder : this, priority : 10 })) this.directChildIdentifier = new Ariadne.DomQueryFinder.Identifier.DirectChild({ finder : this }) }, doQuery : function (query, root) { if (/:contains\(/.test(query) || /:textEquals\(/.test(query) || /:nth-of-type\(\d/.test(query)) return Siesta.Sizzle(query, root) else return (root || document).querySelectorAll(query) }, findQueries : function (target, root, options) { if (!target) throw new Error(&quot;No target&quot;) if (!root) root = target.ownerDocument return this.SUPER(target, root, options) } } }); </pre> </body> </html>