Skip to content

IBCWrapper

Qamsari edited this page Jul 25, 2021 · 1 revision

This interface represent core methods for create and run BasisCore object.

addFragment(selector: string): IBCWrapper;
addFragment(element: Element): IBCWrapper;
addFragment(param: any): IBCWrapper;
setOptions(options: IHostOptions): IBCWrapper;
run(): IBCWrapper;
setSource(
    sourceId: SourceId,
    data: any,
    options?: ISourceOptions
  ): IBCWrapper;

Methods

  • addFragment()
    adding selected fragment of Html element to collection,that BasisCore object must create up on them.parameter can be:

    • string
      Valid css selector like div, #userId or span .myClass div#data
    • element
      Valid Html element of Type Element
  • setOptions()
    Setting options for to be created BasisCore object. For more information see IHostOptions

  • run()
    Create BasisCore object and start rendering process. after create BasisCore object, calling addFragment() method is illegal and rase error.

  • setSource()
    Add or update data source to created BasisCore object. calling this method, execute run() in background an create BasisCore object.

    • sourceId
      Id or name of Source in string format
    • data
      source object in number, string, object and array.In case of number or string, a new object with value field created and data store in that field.
    • options
      options for source. for more information see ISourceOptions

Clone this wiki locally