Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "index"

Index

Functions

Const injectScriptToBody

  • injectScriptToBody(src: string): Promise<void>
  • Example

    import { injectScriptToBody } from '@studyportals/microservice-injector';
    injectScriptToBody('http://some-url.com/script.js')
      .then(() => {
        // Script is loaded
      });

    Parameters

    • src: string

    Returns Promise<void>

Const injectStyleSheetToHead

  • injectStyleSheetToHead(src: string): Promise<void>
  • The stylesheet is added to the body when the head is not available.

    Example

    import { injectStyleSheetToHead } from '@studyportals/microservice-injector';
    injectStyleSheetToHead('http://some-url.com/style.css')
      .then(() => {
        // Stylesheet is loaded
      });

    Parameters

    • src: string

    Returns Promise<void>

Generated using TypeDoc