Tag: ember.js aurelia

捕获包含内联svg的div并将其下载为图像

我编写代码来使用html5捕获页面的屏幕截图。 一切都很好,除非页面包含svg。 当我将svg转换为内联svg之后,该截图未捕获内联svg。 请检查https://jsfiddle.net/7bqukhff/4/ Scrrenshot Generate Screenshot » $(function() { $(‘img’).each(function() { var $img = jQuery(this); var imgID = $img.attr(‘id’); var imgClass = $img.attr(‘class’); var imgURL = $img.attr(‘src’); jQuery.get(imgURL, function(data) { // Get the SVG tag, ignore the rest var $svg = jQuery(data).find(‘svg’); // Add replaced image’s ID to the new SVG if (typeof imgID […]