Skip to content

Request IMG src and LINK href via XHR and serve as Blob URL. Useful for apps running under Content Security Policy (CSP).

License

Notifications You must be signed in to change notification settings

ArtOfContext/angular-xhr-src

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-xhr-src

Request IMG src and LINK href via XHR and serve as Blob URL. Useful for apps running under Content Security Policy (CSP) such as Chrome Apps. Uses this approach: Referencing External Content.

Usage

// dependency on xhrSrc
angular.module('myApp', ['xhrSrc'])
<!-- use xhr-src instead of src and request will be made via XHR -->
<img xhr-src="http://cdn.jsdelivr.net/emojione/assets/png/1F414.png?v=1.2.4">

Live demo

<!-- use xhr-href instead of href and request will be made via XHR -->
<link rel="stylesheet" xhr-href="http://getbootstrap.com/dist/css/bootstrap.min.css">

Live demo

About

Request IMG src and LINK href via XHR and serve as Blob URL. Useful for apps running under Content Security Policy (CSP).

Resources

License

Stars

Watchers

Forks

Packages

No packages published