dynamicCSS.d.ts 711 B

1234567891011121314151617181920
  1. export type ContainerType = Element | ShadowRoot;
  2. export type Prepend = boolean | 'queue';
  3. export type AppendType = 'prependQueue' | 'append' | 'prepend';
  4. interface Options {
  5. attachTo?: ContainerType;
  6. csp?: {
  7. nonce?: string;
  8. };
  9. prepend?: Prepend;
  10. mark?: string;
  11. priority?: number;
  12. }
  13. export declare function injectCSS(css: string, option?: Options): HTMLStyleElement;
  14. export declare function removeCSS(key: string, option?: Options): void;
  15. /**
  16. * manually clear container cache to avoid global cache in unit testes
  17. */
  18. export declare function clearContainerCache(): void;
  19. export declare function updateCSS(css: string, key: string, option?: Options): HTMLStyleElement;
  20. export {};