mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-23 23:24:39 +00:00
7967ab77ee
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 |
||
---|---|---|
.. | ||
dist | ||
ext.popups | ||
ext.popups.images |