I want to detect fields that are autofilled by chrome in js. The following will throw an exception
_isAutofilled: function () {
if (this.el.find(':-webkit-autofill').length > 0) {
return true;
}
return false;
},
Error: Syntax error, unrecognized expression: unsupported pseudo: -webkit-autofill
This will throw either:
$('input:-webkit-autofill')
Is there a clean way to prevent jquery from throwing, even though the pseudo selector is not supported in FF?
I don't want to integrate feature detection and I can't use try/catch
either.
jQuery Version: 2.2.4