{"version":3,"sources":["unsafe-html.ts"],"sourcesContent":["import { Datex } from \"datex-core-legacy/mod.ts\";\nimport { domContext, domUtils } from \"../app/dom-context.ts\";\nimport type { HTMLElement } from \"../uix-dom/dom/deno-dom/src/api.ts\";\n\n/**\n * Injects raw HTML into the DOM by converting the HTML string to a DOM node\n * @param html \n * @param content \n * @returns \n */\nexport function unsafeHTML(html:string, content?: Datex.RefOrValue<HTMLElement>|(Datex.RefOrValue<HTMLElement>)[]) {\n\treturn domUtils.createHTMLElement(html, content)\n}\n\nexport class RawHTML extends domContext.HTMLElement {\n    constructor(public html: string) {\n        super()\n    }\n}\n\n/**\n * Injects raw HTML text into the rendered HTML.\n * This method is currently only supported for backend rendering.\n * @param html \n * @returns RawHTML\n */\nexport function rawHTML(html: string) {\n    return new RawHTML(html);\n}\n"],"names":["domContext","domUtils","unsafeHTML","html","content","createHTMLElement","RawHTML","HTMLElement","constructor","rawHTML"],"mappings":"AACA,SAASA,UAAU,EAAEC,QAAQ,QAAQ,wBAAwB;AAS7D,OAAO,SAASC,WAAWC,IAAW,EAAEC,OAAyE;IAChH,OAAOH,SAASI,iBAAiB,CAACF,MAAMC;AACzC;AAEA,OAAO,MAAME,gBAAgBN,WAAWO,WAAW;;IAC/CC,YAAY,AAAOL,IAAY,CAAE;QAC7B,KAAK,SADUA,OAAAA;IAEnB;AACJ;AAQA,OAAO,SAASM,QAAQN,IAAY;IAChC,OAAO,IAAIG,QAAQH;AACvB","sourceRoot":"/lib/uix-0.4.39/src/html/","file":"unsafe-html.ts"}