[csswg-drafts] Pull Request: [cssom-1] Simplify setting MediaList.mediaText

cdoublev has just submitted a new pull request for https://github.com/w3c/csswg-drafts:

== [cssom-1] Simplify setting MediaList.mediaText ==
This PR removes step 2 for [setting `MediaList.mediaText`](https://drafts.csswg.org/cssom-1/#dom-medialist-mediatext) with empty string since step 3 (parsing) produces the same outcome:

  > 3. Append all the media queries as a result of [parsing](https://drafts.csswg.org/cssom-1/#parse-a-media-query-list) the given value to the collection of media queries.

*Parsing* links to [parse a media query list](https://drafts.csswg.org/cssom-1/#parse-a-media-query-list) which redirects to [`<media-query-list>`](https://drafts.csswg.org/mediaqueries-5/#typedef-media-query-list):

  > To parse a `<media-query-list>` production, parse a comma-separated list of component values, then parse each entry in the returned list as a `<media-query>`.
  >
  > Note: This definition of `<media-query-list>` parsing intentionally accepts an empty list.

Alternatively, [parse a comma-separated list according to a CSS grammar](https://drafts.csswg.org/css-syntax-3/#parse-comma-list) could be directly invoked from the setter, but this requires more changes.

See https://github.com/w3c/csswg-drafts/pull/10014


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 29 February 2024 15:08:07 UTC