### Bug description

My Vegalite plots that I'm creating using Observable with Quarto initially dont show up when I set `width("container")`. Interestingly, they *do* appear when I hit <kbd>F12</kbd> and fire up the javascript console in the the browser.  Here is a minimal example:

````
---
title: "Vegalite with OJS and Quarto"
format: html
---


```{ojs}
import {vl} from "@vega/vega-lite-api-v5"

vl.markPoint().data(vl.sequence(1, 10, 1).as("x"))
  .encode(
        vl.x().fieldQ("x"),
        vl.y().fieldQ("x")
        )
  // this following line causes the issue
  .width("container")
  .render()
```
````

Here's how it looks in my browser. If I remove `.width("container")` the plot appears directly. 

- Here's a web version to try out: https://ratnanil.github.io/minimal-ojs 
- Here's the repo with the code: https://github.com/ratnanil/minimal-ojs

[Screencast from 10.12.2022 09:19:24.webm](https://user-images.githubusercontent.com/12532091/206841049-fa7b001c-1101-45bb-933f-43d3533feac5.webm)

I'm running RStudio 2022.07.1 Build 554 on Ubuntu 22.04


### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
2022-12-10T08:34:11Z
ratnanil
bug wontfix ojs-engine
closed
Plot does not show initially when setting .width("container") when using OJS and Vegalite
https://github.com/quarto-dev/quarto-cli/issues/3622