node_modules/lit-analyzer/lib/index.cjs.js
/**
 * Parses a single p5Node into a html node.
 * @param p5Node
 * @param parent
 * @param context
 */
Parses a single p5Node into a html node.
Parses a single p5Node into a html node .
function parseHtmlNode(p5Node, parent, context) {
    if (getSourceLocation(p5Node) == null)
        return undefined;
    var htmlNodeBase = {
        tagName: p5Node.tagName.toLowerCase(),
        selfClosed: isSelfClosed(p5Node),
        attributes: [],
        location: makeHtmlNodeLocation(p5Node),
        children: [],
        parent: parent
    };
    var htmlNode = parseHtmlNodeBase(htmlNodeBase);
    if (htmlNode.kind === HtmlNodeKind.NODE) {
        htmlNode.children = parseHtmlNodes(p5Node.childNodes || [], htmlNode, context);
    }
    htmlNode.attributes = parseHtmlNodeAttrs(p5Node, __assign(__assign({}, context), { htmlNode: htmlNode }));
    return htmlNode;
}
function parseHtmlNode ( p5Node , parent , context ) { if ( getSourceLocation ( p5Node ) == null ) return undefined ; var htmlNodeBase = { tagName : p5Node . tagName . toLowerCase ( ) , selfClosed : isSelfClosed ( p5Node ) , attributes : [ ] , location : makeHtmlNodeLocation ( p5Node ) , children : [ ] , parent : parent } ; var htmlNode = parseHtmlNodeBase ( htmlNodeBase ) ; if ( htmlNode . kind === HtmlNodeKind . NODE ) { htmlNode . children = parseHtmlNodes ( p5Node . childNodes || [ ] , htmlNode , context ) ; } htmlNode . attributes = parseHtmlNodeAttrs ( p5Node , __assign ( __assign ( { } , context ) , { htmlNode : htmlNode } ) ) ; return htmlNode ; }
Parses a single p5Node into a html node.
Parses a single p5Node into a html node .
// `sourceCodeLocation` will be undefined if the element was implicitly created by the parser. // Don't parse children of <style> and <svg> as of now