来源节选(非本站原创长文,完整内容请见来源)
Browsers natively handle a lot of what used to take 50 lines of JS (or a dependency): CSS.highlights for text range highlighting without <span>s everywhere, <dialog> and showModal() give you backdrops and ideal focus management, field-sizing to auto-grow textareas as the user types.. (Something yesterday's ftrain post touched on [0]) Models know about some of these by name, but consistently won't default to using the platform-native solution and instead prefer the incumbent <div>+JS based pattern.
文章来源
github.com