Re: [w3c/webcomponents] CSS Modules (#759)

Why would you do that, rather than just getting/setting `document.adoptedStylesheets` in each function?

Also, note that this is a consequence of `await` semantics in argument position; they're a little unobvious and should generally be avoided. (Basically, all preceding arguments are eagerly evaluated before the function pauses.) If you wrote those functions as:

```js
async function addB() {
  const newVal = await resolveAfter('c', 50);
  arr = [...arr, newVal];
}
```

...you'd be just fine and it would work as expected, with arr being `['a', 'c', 'b']` at the end.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/759#issuecomment-521082126

Received on Wednesday, 14 August 2019 02:50:48 UTC