Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "frontend-packages/headless-content-unblocker/src/dom/putHtmlCodeToDom"

Index

Variables

Const WINDOW_ONLOAD_UNBLOCK_REPLACEMENT

WINDOW_ONLOAD_UNBLOCK_REPLACEMENT: "rcbInitiatorOnload" = "rcbInitiatorOnload"

We do not modify window.onload directly, you need to use this variable name.

Functions

putHtmlCodeToDom

  • putHtmlCodeToDom(html: string, dynamics: Parameters<typeof applyDynamicsToHtml>[1], referenceNode?: Element): Promise<void>
  • Put HTML code to the current DOM. script tags gets automatically executed instead of pushing to DOM.

    see

    https://github.com/krux/postscribe

    see

    https://stackoverflow.com/a/49724894/5506547

    Parameters

    • html: string
    • dynamics: Parameters<typeof applyDynamicsToHtml>[1]
    • Default value referenceNode: Element = document.body

    Returns Promise<void>

Generated using TypeDoc