Here is the context: I want to use Effect.Highlight but I want to be able to specify the start and end colors using CSS instead of hardcoding it in my JS. The problem is that Effect.Highlight is unconditionally setting the style attribute on the element when the effect finishes even if that style actually came from CSS. The effect runs as expected only the first time.
In my example, I want to highlight an input element when the user makes a change to it. So I created a class 'updated' in CSS that defines the background-color, i.e. the effect start color. Before applying the effect I get the current background-color for the input element, i.e. the effect start color, add the 'updated' class, get the new background-color, i.e. the start color, and remove the added class. Then I apply the effect. After the first time the input is changed, the effect appears as expected, but the background-color style is set on the element. Any subsequent changes will not work because now the background-color after and before the class is added is the same, i.e. the end color.
I looked into the Effect.Highlight implementation and it seems that both the background-color and background-image styles should only be set on the element in the Highlight.finish() method IFF they explicitly existed on the element before the effect was applied.