@stolbivi/pirojok
Version:
Some minimalistic library used to build chrome extensions, covers some popular Chrome Extension API
18 lines (17 loc) • 763 B
TypeScript
/**
* Injects a script file into the specified HTML node.
*
* @param {string} file - The path to the JavaScript file to inject
* @param {string} node - The HTML tag name of the parent node where the script should be injected
* @returns {void}
*/
export declare function injectScript(file: string, node: string): void;
/**
* Creates and injects an iframe element into the specified node.
*
* @param {string} id - The unique identifier for the iframe element
* @param {string} src - The source URL for the iframe content
* @param {Node} node - The parent node where the iframe should be injected
* @returns {HTMLIFrameElement} The created iframe element
*/
export declare const injectIframe: (id: string, src: string, node: Node) => HTMLIFrameElement;