Skip to content

Commit

Permalink
Merge pull request #101 from rubenstolk/feature/crossorigin
Browse files Browse the repository at this point in the history
Allow passing through of crossorigin attribute
  • Loading branch information
bicknellr authored May 30, 2017
2 parents 7c9415a + f10c151 commit cb82f17
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions iron-image.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,12 @@
hidden$="[[_computeImgDivHidden(sizing)]]"
aria-hidden$="[[_computeImgDivARIAHidden(alt)]]"
aria-label$="[[_computeImgDivARIALabel(alt, src)]]"></div>
<img id="img" alt$="[[alt]]" hidden$="[[_computeImgHidden(sizing)]]"
on-load="_imgOnLoad" on-error="_imgOnError">
<img id="img"
alt$="[[alt]]"
hidden$="[[_computeImgHidden(sizing)]]"
crossorigin$="[[crossorigin]]"
on-load="_imgOnLoad"
on-error="_imgOnError">
<div id="placeholder"
hidden$="[[_computePlaceholderHidden(preload, fade, loading, loaded)]]"
class$="[[_computePlaceholderClassName(preload, fade, loading, loaded)]]"></div>
Expand All @@ -158,6 +162,14 @@
value: null
},

/**
* CORS enabled images support: https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image
*/
crossorigin: {
type: String,
value: null
},

/**
* When true, the image is prevented from loading and any placeholder is
* shown. This may be useful when a binding to the src property is known to
Expand Down

0 comments on commit cb82f17

Please sign in to comment.