Functions
addCacheKey
- addCacheKey(path: string, needClean?: boolean): string
Parameters
path: string
needClean: boolean = true
Returns string
addCustomTag
- addCustomTag(href: string, reside: boolean, isScript: boolean): boolean
Parameters
href: string
reside: boolean
isScript: boolean
Returns boolean
addEventListener
- addEventListener(element: Document | Element, type: string, listener: EventListenerOrEventListenerObject): void
Parameters
element: Document | Element
type: string
listener: EventListenerOrEventListenerObject
Returns void
callAndListen
- callAndListen(callback: () => void, event: EEvent, element?: Document | Element, reside?: boolean): void
Parameters
callback: () => void
element: Document | Element = document
reside: boolean = false
Returns void
encodeParam
- encodeParam(value: string): string
evalFunction
- evalFunction(evalStr: string, params: Dict<any>, asyncResults?: TAsyncResult[]): [string, boolean]
Parameters
Returns [string, boolean]
getMessage
- getMessage(key: string, params?: TMessage): string
isolatedEval
- isolatedEval(str: string): any
replaceByRegExp
- replaceByRegExp(regexp: RegExp, data: string, callback: (match: RegExpExecArray) => string): string
Parameters
regexp: RegExp
data: string
callback: (match: RegExpExecArray) => string
- (match: RegExpExecArray): string
Returns string
stringifyAny
- stringifyAny(value: any): string
trimList
- trimList(list: string[], distinct?: boolean): string[]
Parameters
list: string[]
distinct: boolean = true
Returns string[]
waitFor
- waitFor<T>(callback: () => T, maxCount?: number, timeout?: number): Promise<undefined | T>
Type parameters
Parameters
callback: () => T
maxCount: number = 100
timeout: number = 100
Returns Promise<undefined | T>
waitForEvent
- waitForEvent<T>(callback: () => T, event: EEvent, element?: Document | Element): Promise<T>
Type parameters
Parameters
callback: () => T
element: Document | Element = document
Returns Promise<T>