load-style-p
v1.0.0
Published
Load style as promise.
Downloads
5
Readme
load-style-p
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ć