diff --git a/cssom-1/Overview.bs b/cssom-1/Overview.bs index 45c319e62094..a46f1e108869 100644 --- a/cssom-1/Overview.bs +++ b/cssom-1/Overview.bs @@ -748,21 +748,23 @@ represents a style sheet as defined by the CSS specification. In the CSSOM a
CSSStyleSheet(options)
- When called, execute these steps: + When called, execute the steps to create a constructed CSSStyleSheet given options and return the result. +
+ +
To create a constructed {{/CSSStyleSheet}}
given {{CSSStyleSheetInit}} options, run these steps: +
    -
  1. Construct a new {{/CSSStyleSheet}} object sheet with the following properties: - +
  2. Construct a new {{/CSSStyleSheet}} object sheet.
  3. +
  4. Set sheet's location to the base URL of the associated Document for the current global object. +
  5. Set sheet's stylesheet base URL to the {{CSSStyleSheetInit/baseURL}} attribute value from options. +
  6. Set sheet's parent CSS style sheet to null. +
  7. Set sheet's owner node to null. +
  8. Set sheet's owner CSS rule to null. +
  9. Set sheet's title to the the empty string. +
  10. Unset sheet's alternate flag. +
  11. Set sheet's origin-clean flag. +
  12. Set sheet's constructed flag. +
  13. Set sheet's Constructor document to the associated Document for the current global object.
  14. If the {{CSSStyleSheetInit/media}} attribute of options is a string, create a MediaList object from the string and assign it as sheet's media. @@ -1027,14 +1029,17 @@ The replace(text) method
  15. Return promise.
-The replaceSync(text) method must run the following steps: +The replaceSync(text) method must run the +steps to synchronously replace the rules of a CSSStyleSheet on this {{CSSStyleSheet}} given text. + +To synchronously replace the rules of a CSSStyleSheet on sheet given text, run these steps:
  1. If the constructed flag is not set, or the disallow modification flag is set, throw a {{NotAllowedError}} {{DOMException}}.
  2. Let rules be the result of running parse a list of rules from text. If rules is not a list of rules (i.e. an error occurred during parsing), set rules to an empty list.
  3. If rules contains one or more @import rules, remove those rules from rules. -
  4. Set CSS rules to rules. +
  5. Set sheet's CSS rules to rules.
#### Deprecated CSSStyleSheet members #### {#legacy-css-style-sheet-members}