Skip to content

Instantly share code, notes, and snippets.

@oleersoy
Created November 14, 2018 02:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oleersoy/f3fa6e4af91681ebc64f1fcf2fac746c to your computer and use it in GitHub Desktop.
Save oleersoy/f3fa6e4af91681ebc64f1fcf2fac746c to your computer and use it in GitHub Desktop.
private supportsSvg;
private hasHtml5FileApiSupport;
constructor(@Optional() @Inject(DOCUMENT) document: Document) {
this.hasHtml5FileApiSupport = w.File && w.FileReader && w.FileList && w.Blob;
this.supportsSvg = !!(
document &&
document.createElementNS &&
document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment