Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.parEach(function (imageInfo, i) {
var processedAsset = new AssetGraph.assets.Png({
rawSrc: this.vars[i]
});
processedAsset.url = urlTools.resolveUrl(assetGraph.root, processedAsset.id + processedAsset.defaultExtension);
assetGraph.addAsset(processedAsset);
imageInfo.incomingRelations.forEach(function (incomingRelation) {
var style = incomingRelation.cssRule.style;
style.removeProperty(postProcessPropertyName);
if (imageInfo.ie6) {
// Designates that the processed image should only be used in IE6
// Keep the original relation and use the underscore hack for getting
// IE6 to fetch the processed version:
if (('_' + incomingRelation.propertyName) in style) {
throw new Error("transforms.postProcessCssImages: Underscore hack already in use in Css rule");
}
style.setProperty('_' + incomingRelation.propertyName, 'url(...)', style.getPropertyPriority(incomingRelation.propertyName));
var relation = new AssetGraph.relations.CssImage({
propertyName: '_' + incomingRelation.propertyName,
cssRule: incomingRelation.cssRule,
from: incomingRelation.from,