The supports method is used to add a specific function when a given token  is in the associated attribute's supported tokens. For examples if an element allows download you can make it say a message in the console then put a function if something else happends.

const head = document.querySelector('h1');

if (head.sandbox.supports('allow-downloads')) {
console.log("Yes!!");
}
else {
console.log("noo!!");
}