mediawiki-extensions-Popups/resources
Bartosz Dziewoński 7967ab77ee Properly create the <svg> and <image> elements for thumbnails
We have to be careful about the namespaces here, and then we don't
need the awful `.html( .html() )` hack. (I honestly have no idea
why that even worked for some browsers, it really shouldn't have.
The comment next to it is wrong.)

* Construct the 'svg:svg' element with the right namespace
* Set 'xlink:href' attribute on 'svg:image' element with the right namespace

Doing this correctly makes the thumbnails work in Opera 12, and it also
works as before in (at least) Chromium 57, Firefox 53, IE 11 and Edge.

I can't find out what version of Safari the other hack here was
supposed to apply to, but the code was wrong in both cases, and the
hack was mistakenly also applied to modern Chromium.

Useful resources for dealing with SVG embedded in HTML while scripting:

* http://stackoverflow.com/questions/6701705/programmatically-creating-an-svg-image-element-with-javascript
  * http://jsfiddle.net/UVFBj/8/
* https://www.w3.org/Graphics/SVG/WG/wiki/Href#xlink:href

Bug: T161799
Change-Id: I30b2a1291811296424018e013bd07055ae7551d7
2017-03-31 22:39:28 +02:00
..
dist Properly create the <svg> and <image> elements for thumbnails 2017-03-31 22:39:28 +02:00
ext.popups build: Update stylelint to 0.4.1 2017-03-20 14:50:42 +00:00
ext.popups.images Hovercards: Improve layout of settings dialog to design spec 2016-08-10 14:01:36 -04:00