npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

import-href

1.0.0

@hemanth

npmHomeRepoSnykSocket
Downloads:89
$ npm install import-href
DailyWeeklyMonthlyYearly

import-href

Imperatively import an HTML document.

Install

$ npm install --save import-href

Usage

var importHref = require('import-href');

importHref('http://example.com/meow-component.html',
						function onLoad(){},
						function onError(){});

API

importHref(href, onload, onerror)

href

URL

Required
Type: string

href URL that needs to be imported.

onload

onload callback

Type: function

Callback function which will be executed after load

onerror

onerror callback function

Type: function

Callback function which will be executed if there is an error

License

MIT © hemanth.hm