1.0.0 • Published 5 years ago

load-style-p v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

load-style-p

Build Status BrowserStack Status

Load style as promise.

Install

npm install load-style-p --save

Usage

import loadStyle from 'load-style-p';

loadStyle('http://example.com/jackie.css')
	.then(()=> {
		// ...
	});

API

loadStyle(src)

Returns: Promise

Loads stylesheet from URL.

src

Type: String

Stylesheet URL.

Browser support

Tested in IE9+ and all modern browsers. Promise should be available globally.

Test

For automated tests, run npm run test:automated (append :watch for watcher support).

License

MIT © Ivan Nikolić