CSSFactory.registerDefaultMatchCondition() needs to be non-static
Pure Java HTML / CSS rendering engine
Status: Beta
Brought to you by:
radkovo
CSSFactory.registerDefaultMatchCondition() is setting static state. I have a project which has multiple DOMs active simultaneously and shared global state doesn't work.
Can you move this into a non-static context? The DOMAnalyser seems to be a good place to keep match conditions.
Anonymous
Please let us know whether this proposal make sense. We can take up the implementation if we get a green signal.
Great, you have a green signal. I agree that DOMAnalyzer is a good place for this. However, I prefer maintaining backward compatibility when possible. So my proposal is: keep the registerDefaultMatchCondition() for specifying the system-wide defaults and add a new (e.g. DomAnalyzer.addMatchCondition) for adding/overriding the conditions. Does this make sense?
Fixed by PR
Closed in 1.19