Skip to content

Commit

Permalink
2.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
timeiscoffee committed Apr 18, 2017
1 parent b57cba0 commit 377d272
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.1.8 (2017-04-18)

- Added: Support for [custom attribute on `use` elements](https://github.com/jonathantneal/svg4everybody/pull/155)

## 2.1.7 (2017-03-03)

- Updated: Fixing internal use tag in polyfill
Expand Down
3 changes: 2 additions & 1 deletion dist/svg4everybody.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// like Node.
module.exports = factory() : root.svg4everybody = factory();
}(this, function() {
/*! svg4everybody v2.1.7 | github.com/jonathantneal/svg4everybody */
/*! svg4everybody v2.1.8 | github.com/jonathantneal/svg4everybody */
function embed(parent, svg, target) {
// if the target exists
if (target) {
Expand Down Expand Up @@ -55,6 +55,7 @@
var use = uses[index], parent = use.parentNode, svg = getSVGAncestor(parent);
if (svg) {
var src = use.getAttribute("xlink:href") || use.getAttribute("href");
!src && opts.attributeName && (src = use.getAttribute(opts.attributeName));
if (polyfill) {
if (!opts.validate || opts.validate(src, svg, use)) {
// remove the <use> element
Expand Down
5 changes: 3 additions & 2 deletions dist/svg4everybody.legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// like Node.
module.exports = factory() : root.svg4everybody = factory();
}(this, function() {
/*! svg4everybody v2.1.7 | github.com/jonathantneal/svg4everybody */
/*! svg4everybody v2.1.8 | github.com/jonathantneal/svg4everybody */
function embed(parent, svg, target) {
// if the target exists
if (target) {
Expand Down Expand Up @@ -56,7 +56,8 @@
if (svg) {
var src = use.getAttribute("xlink:href") || use.getAttribute("href");
// if running with legacy support
if (nosvg) {
if (!src && opts.attributeName && (src = use.getAttribute(opts.attributeName)),
nosvg) {
// create a new fallback image
var img = document.createElement("img");
// force display in older IE
Expand Down
2 changes: 1 addition & 1 deletion dist/svg4everybody.legacy.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/svg4everybody.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/svg4everybody.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! svg4everybody v2.1.7 | github.com/jonathantneal/svg4everybody */
/*! svg4everybody v2.1.8 | github.com/jonathantneal/svg4everybody */

function embed(parent, svg, target) {
// if the target exists
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "svg4everybody",
"version": "2.1.7",
"version": "2.1.8",
"description": "Use external SVG spritemaps in any browser",
"main": "dist/svg4everybody.js",
"dependencies": {},
Expand Down

0 comments on commit 377d272

Please sign in to comment.