w3c / uievents

UI Events
https://w3c.github.io/uievents/
Other
145 stars 52 forks source link

Declare more detail of `InputEvent.data` value of `formatFontName` #223

Open masayuki-nakano opened 5 years ago

masayuki-nakano commented 5 years ago

Currently, declared as:

the proposed value of the font-family CSS property

So, perhaps, setting data to raw value (I mean specified value as-is) must be the best for any browsers. E.g., if browsers need to serialize the value with "" and , before setting the data value, browsers need to copy the given string. But the allocation cost may not be cheap if browsers need to allocate it into heap (I assume that some browsers do not need to copy to refer same string because of managing string buffer with refcount unless modified). Additionally, this special path is required only for odd cases like document.execCommand("fontName", false, " foo, bar ,bazz");. So, I'd like to suggest that this value should be declared as specified value as-is.