Shobhit Sharma edited this page Oct 16, 2017 · 6 revisions

Embedo exposes following functions that you need after including the library:


The .load() function is all what you need to embed third party content given under following arguments.

embedo.load(<HTMLElement{}>, <URL[string|Array]>, <options[{}*optional]>)

Due to incongruent third party restrictions regarding sizes, additional functionality called automagic is added, which basically auto-scales the container to fit within DOM without overflowing (enabled by default unless strict is set to true).


 .load(HTMLElement, 'my://url/goes/here', { centerize: true })
 .done(data => {})
 .fail(err => {})


For single instance with similar arguments, render method can alternatively be called which returns a callback instead.

embedo.render(<HTMLElement{}>, <URL[string]>, <options[{}*optional]>, <callback|Function>)


embedo.render($('#el').get(0), 'my://url/goes/here', function (err, result) {
  if (err) {
    return err;
  console.log('Embedo rendered', result);


The embedo.refresh() method can be called explicitly when you have a change or resize event, which re-calculates the dimensions of generated content.

// Refresh single container

// Refresh all embedo instances


The embedo.destroy() method can be called explicitly when wish to remove and unbind embedo instance(s).

// Destroy single container

// Destroys all embedo instances
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.