-
Notifications
You must be signed in to change notification settings - Fork 0
IUtilWrapper
This interface expose some helper methods.
export default interface IUtilWrapper {
cloneDeep<T>(obj: T): T;
defaultsDeep<T>(data: Partial<T>, defaults: Partial<T>): T;
getLibAsync(objectName: string, url: string): Promise<any>;
toNode(rawHtml: string): DocumentFragment;
toHTMLElement(rawXml: string): HTMLElement;
getComponentAsync(context: IContext, key: string): Promise<any>;
source: ISourceWrapper;
}-
source
Get an instance of ISourceWrapper object.
-
cloneDeep()
Create deep clone copy of object passed as parameter. -
defaultsDeep(data,defaults)
This method create deep clone copy ofdataobject and set default value for those fields that present indefaultsobject and not set indataobject. -
getLibAsync(objectName,url)
this method check for object that her name send asobjectName. if object already exist (notundefinedornull) return it. otherwise load script fromurland add to DOM asscripttag. then return object. this method wait until script loaded. -
toNode(rowHtml)
Create DocumentFragment fromrawHtmland return it.rawHtmlisstringthat represent rawhtml; -
toHTMLElement(rawXml)
Create HTMLElement fromrawXMLand return it.rawXMLisstringthat represent rawhtmlbut in Well-formedXML. this method use DOMParser.parseFromString() withmimetypeset toapplication/xml. -
getComponentAsync(context,key) Finding component class by search
keyincontextrelated repository and return new instance of it. for more information aboutcontextvisit IContext.
Copyright © 2020 Manzoomeh Negaran Co Lts.
Powered by BasisCore
- Home
- IContext
- $bc
- Source
- Options
- ConnectionOptions
- Component
- UserDefinedComponent
- APIComponent
- HTML Components
- SourceBase Components
- Source Components
- Callback Argument
- Enum
- Util