Skip to content

Commit

Permalink
Add support for custom attribute on use element (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Frampton authored and timeiscoffee committed Apr 18, 2017
1 parent a82807c commit b57cba0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/svg4everybody.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ function svg4everybody(rawopts) {
if (svg) {
var src = use.getAttribute('xlink:href') || use.getAttribute('href');

if (!src && opts.attributeName) {
src = use.getAttribute(opts.attributeName);
}

// if running with legacy support
if (LEGACY_SUPPORT && nosvg) {
// create a new fallback image
Expand Down

0 comments on commit b57cba0

Please sign in to comment.