/** * @packageDocumentation * @module @tomato-js/element */ import { HTMLSelector } from "@tomato-js/shared"; /** * 获取dom节点 * * * 结构举例 * ```html *
123
*
123
* ``` * * 脚本举例 * ```javascript * import { get } from '@tomato-js/element' * const node = get('abc'); * const node2 = get('.j-abc'); * ``` * * @param str - id或者是提供给query的字符串 * @returns 获取到的dom节点 */ export default function get(str: HTMLSelector): HTMLElement | null;