v154 · typed om in workers

Parsing off the main thread

The fallback for a worker without Typed OM is a regular expression. It works for 16px and then quietly gets everything else wrong. Run both against the same list and read the disagreements — they are not edge cases you can dismiss, they are calc(), units, and values that should have been rejected.

Parse a list of values

Typed OM against a regular expression, both inside the worker
inputTyped OMregex fallbackagree?
Not run yet.
Press the button.

Both parsers run in the same worker, so this is not a thread comparison — it is a correctness one. The point of having Typed OM in a worker is that the work can move off the main thread without giving up the CSS parser.

see also