Static
absentStatic
globalreference to the environmental global object
disabled flag
settable flag for disabled
reference to the systems global object (globalThis, window, global, depending on the environment)
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
lazy stream representation for this DomQuery
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
convenience for dq.id.value to make the code a little tighter
convenience for dq.id.value to make the code a little tighter
nonce value if our first root element
accumulated top element offsetHeight
accumulated top element offsetLeft
accumulated top element offsetTop
accumulated top element offsetWidth
an early stream representation for this DomQuery
abbreviation for inputValue.value to make the code terser
abbreviation for inputValue.value to make the code terser
All elements as array
adds an event listener
Optional
options: boolean | EventListenerOptionsattr 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
iterate over each element and perform something on the element (Dom element is passed instead of DomQuery)
Optional
cnt: numberencodes 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
perform an operation on the first element returns a DomQuery on the first element only
Optional
cnt: numberreturns 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
perform an operation on the first element returns a DomQuery on the first element only
Optional
cnt: numberloads 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
looks ahead cnt without changing the internal data "pointers" of the data source (this is mostly needed by possibly infinite constructs like lazy streams, because they do not know by definition their boundaries)
either the element or ITERATION_STATUS.EO_STRM if we hit the end of the stream before finding the "cnt" element
the elements to look ahead
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...)
removes an event listener
Optional
options: boolean | EventListenerOptionsRun 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.