1.0.0 • Published 7 years ago
load-style-p v1.0.0
load-style-p
Load style as promise.
Install
npm install load-style-p --saveUsage
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ć
1.0.0
7 years ago