SVG Files Loader for SystemJS and JSPM
This plugin allows to handle SVG files with DOM as specified by the W3C . However If you simply want to display a SVG image in your html document, the official image plugin could be a better choice for you.
Compatibility
✔ Browsers
Although SystemJS is compatible with Internet Exlplorer 8, it is not the case of this plugin: the compatibility of IE with SVG is limited to the version 9 (and more recents).
For more details about the SVG support by browsers: read the dedicated caniuse feature.
✘ NodesJS
The plugin uses a DOMParser object and the SVGDocument interface which are not availables from NodeJS. Consequently, this plugin is not usable without browsers.
SVG File
The SVG loaded file must be well-formed, else an exception can be catched or the parser can interpret the document elements like unknowns.
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" version="1.0"><!--- DOCTYPE is optional- NAMESPACE is required- VERSION is optional--> <!-- Insert your content here... --></svg>
Examples
It is possible to appends the SVG file as picture.
<!-- The SVG file will be inserted here. --> Inserted SVG File.
You can also handle the loaded file:
System;