Reputation: 5070
Is there any way to disable srcset support in Chrome for testing? I'd like to use the Chrome dev tools, and want to simulate a browser that doesn't support srcset.
Upvotes: 3
Views: 721
Reputation: 2094
It's not quite what you're looking for (support will still be present) but you can maybe fake lack of support by changing the attributes. With jQuery:
$('[srcset]').each(function(idx, el) {
$(el).attr('not-srcset', $(el).attr('srcset'));
$(el).removeAttr('srcset');
});
Upvotes: 1
Reputation: 2270
After features in Blink (the rendering engine behind Chrome & Opera) reach a certain stable stage, the feature flags that are used to introduce them are removed from the code. Srcset's feature flags have been removed, so there's certainly no way to turn it off in Chrome, without building your own binary.
Even before the flags are removed, I don't know of an easy way to turn on/off a specific feature (they're usually categorized to experimental and stable, and turned on/off in bulk).
Upvotes: 3