<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<script src="https://cdn.jsdelivr.net/npm/nwsapi@2.2.13/src/nwsapi.min.js" onload="NW.Dom.install"></script>
</head>
<body>
<div id="test">test</div>
<script>
const element = NW.Dom.byId("test", document)[0];
const isAutofill = NW.Dom.match(":autofill", element);
document.write("isAutofill: " + isAutofill);
</script>
</body>
</html>
It might be reasonable to always return
falseinstead - autofill is not really possible in this environmentAutofill pseudo class: https://developer.mozilla.org/en-US/docs/Web/CSS/:autofill