Static
absentStatic
globalvarious environments handle the global variable different we have to deal with this.
disabled flag
returns the id of the first element
getter abbreviation to use innerHTML directly
abbreviation property to use innerHTML directly like on the dom tree
the new inner html which should be attached to "this" domQuery
same here, getter for allowing innerHtml directly
since the dom allows both innerHTML and innerHtml we also have to implement both
see above
convenience property for value
returns null in case of no type existing otherwise the value of the first element
fetches a lazy stream representation lazy should be applied if you have some filters etc. in between, this can reduce the number of post filter operations and ram usage significantly because the operations are done lazily and stop once they hit a dead end.
length of the entire query set
convenience property for name
returns null in case of no type existing otherwise the name of the first element
attr accessor, usage myQuery.attr("class").value = "bla" or let value myQuery.attr("class").value
the attribute to set
the default value in case nothing is presented (defaults to null)
same as byId just for the tag name
the tag-name to search for
Optional
includeRoot: booleanshall the root element be part of this search
Optional
deep: booleando we also want to go into shadow dom areas
encodes all input elements properly into respective config entries, this can be used for legacy systems, for newer use-cases, use the HTML5 Form class which all newer browsers provide
a copy pf
optional config which can be merged in
returns the nth element as optional of an Element object
the number from the index
the default value if the index is overrun default Optional.absent
should make the code clearer note if you pass a function this refers to the active DomQuery object
loads and evaluates a script from a source uri
the source to be loaded and evaluated
in milliseconds execution default (0 == no delay)
Optional
nonce: stringoptional nonce value to allow increased security via nonce crypto token
loads and evaluates a script from a source uri
the source to be loaded and evaluated
in milliseconds execution default (0 == no delay)
Optional
nonce: stringoptional nonce parameter for increased security via nonce crypto token
returns the next element in the stream difference to next is, that the internal data position is not changed, so next still will deliver the next item from the current data position. Look ahead is mostly needed internally by possible endless data constructs which have no fixed data boundary, or index positions. (aka infinite sets, or flatmapped constructs)
outerHTML convenience method browsers only support innerHTML but for instance for your jsf.js we have a full replace pattern which needs outerHTML processing
the markup which should replace the root element
Optional
runEmbeddedScripts: booleanif true the embedded scripts are executed
Optional
runEmbeddedCss: booleanif true the embedded css are executed
should this also work for shadow dom (run scripts etc...)
Run through the given nodes in the DomQuery execute the inline scripts
if set to true the evaluated elements will stick to the head, default false
helper to fix a common dom problem we have to wait until a certain condition is met, in most of the cases we just want to know whether an element is present in the sub dom-tree before being able to proceed
Static
byStatic
byStatic
fromStatic
getStatic
globalStatic
globalStatic
queryStatic
queryStatic
setGenerated using TypeDoc
Monadic DomNode representation, ala jquery This is a thin wrapper over querySelectorAll to get slim monadic support to reduce implementation code on the users side. This is vital for frameworks which want to rely on plain dom but still do not want to lose the reduced code footprint of querying dom trees and traversing by using functional patterns.
Also, a few convenience methods are added to reduce the code footprint of standard dom processing operations like eval
in most older systems Note parts of this code still stem from the Dom.js I have written 10 years ago, those parts look a bit ancient and will be replaced over time.