Img

Img

Display image by tag ""

Constructor

new Img(data)

Parameters:
Name Type Description
data iBoxConstructor | string

Object with parameters or string of url.

Source:
Example
let img = new Image("http://lorempixel.com/400/200/");

Extends

Methods

addListener(value) → {void}

Add new event listener

Parameters:
Name Type Description
value Listener

Listener object

Overrides:
Source:

className(value) → {string}

Get/Set style-classes

Parameters:
Name Type Description
value String

To set new string of style-classes

Overrides:
Source:

listen(name, cb, after) → {Listener}

To listen event from this component

Parameters:
Name Type Description
name string

Name of event

cb function

Callback for fired event

after boolean

For phase before changes if "false" (by default) or after changes if "true"

Overrides:
Source:

removeListener(value) → {void}

To remove installed event listener

Parameters:
Name Type Description
value Listener

Listener object

Overrides:
Source:

removeListeners() → {void}

To remove all installed event listeners

Overrides:
Source:

trigger(value) → {Action}

To fire event

Parameters:
Name Type Description
value Action | string

Action object

Overrides:
Source:

url(value)

Get/Set string of url

Parameters:
Name Type Description
value string | undefined

String with url of type.

Source:
Example
let img = new Img();
 img.url("http://lorempixel.com/400/200/");