window.getComputedStyle(option1, '::after').setProperty('animation', 'select');
I am using this but it gives a error that
DOMException { stack: "Error: Failed to execute 'setProperty' on 'CSSStyleDeclaration': These styles are computed, and therefore the 'animation' property is read-only.↵ at HTMLDivElement.<anonymous> (http://localhost:7700/index.html:68:55)" }