Q:

Is there a way to access pseudo property styles in dart Node API?

The Dart Node API reference has a property style on Node elements. This allows me to programmatically set style properties. I'm trying to set the mouse cursor for when the mouse is dragging over an element. To do this I need to be able to set the style properties for the :active or :focus pseudoproperties. Is there a way for me to access these StyleDeclarations programmatically?

A:

@Alexandre has pointed out how you can dynamically change style properties for pseudo-classes.  I'll point out that in practice, I usually find it easier to dynamically change the class of an element such that it matches a pre-existing selector in my CSS file.
For example, if your CSS file includes:
.someClass:active {/* styles */}

then you can just add and remove someClass from the element's classes dynamically as needed.  Unless you have to do something complex to generate the styles, this is generally easier.

