You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To create a CSSUnitValue from a string str, return a new CSSUnitValue object with its value internal slot set to the numeric portion of str parsed into a number, and its unit internal slot set to the unit portion of str, or "number" or "percent" if str is a plain number or percent.
This seems to be inventing its own CSS parsing, and does it in a rather vague way (for example, what's a "numeric portion" -- does it support scientific notation?). It seems like it would be better to depend on the way CSS already parses dimensions.
The text was updated successfully, but these errors were encountered:
That's solely an internal algorithm, used to make it much more convenient to create numeric values inline in an algorithm. (Currently only used in one place, but I expect it will see more use as we make more of them.)
The definition of create a CSSUnitValue from a string says:
This seems to be inventing its own CSS parsing, and does it in a rather vague way (for example, what's a "numeric portion" -- does it support scientific notation?). It seems like it would be better to depend on the way CSS already parses dimensions.
The text was updated successfully, but these errors were encountered: