Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
HocrDOM.isHocrElement(context, options, cache)
true
if this has an ocr_*
class, false
otherwise
@param {Document|Element}
context Context element@param {Object}
options See Options@param {Object}
cache If provided, will cache the properties in this object with key _hocr
HocrDOM.getHocrProperties(context, options, cache)
List the properties of this hOCR element as an object
@param {Document|Element}
context Context element@param {Object}
options See Options@param {Object}
cache If provided, will cache the properties in this object with key _hocr
HocrDOM.queryHocr(context, query, options)
Find the first hOCR element matching query
See queryHocrAll for options
HocrDOM.queryHocrAll(context, query, options)
@param {Document|Element}
context Context element@param {String|Object}
query Object of query parameters. If a string -> query.class
@param {String} query.tag
tag names to look for. Default '*'@param {String} query.title
title
attribute must contain this string@param {String} query.clauses
String of clauses for querySelector@param {String|Array}
class Elements with this class (if string) or any of these classes (if array)@param {String} query.context
context element to query below. Otherwise root element of DOM.@param {String} query.terminal
Return only hocr-elements containing no hocr-elements themselves@param {String} query.nonTerminal
Opposite of terminal
@param {String} query.filter
Arbitrary filter to prune resulting element setHocrDOM.extendPrototypes({Element, Document}, options)
Extend the prototypes of Element
and Document
with hOCR-specific
methods and properties.
el.queryHocr(query, options)
Same as HocrDOM.queryHocr
but with context set to el
el.queryHocrAll(query, options)
Same as HocrDOM.queryHocrAll
but with context set to el
el.isHocrElement
Property containing whether this is an hOCR element
el.hocr
Property containing the hOCR properties
new HocrPropertyParser(opts)
@param {Object} opts
All options are false
by default
@param {Object} opts.debug
Whether to log debug output@param {Object} opts.allowUnknown
Whether to silently ignore properties not in the spec@param {Object} opts.allowInvalidNumbers
Whether to silently ignore invalid number (wrong type e.g.)@param {Object} opts.disableCardinalityChecks
Whether to silently ignore invalid argument cardinalityparse(str)
Tokenize and Parse the hOCR properties in a title string
FAQs
Extend HTMLDocument and Element with hOCR query and property helpers
We found that hocr-dom demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.