### Bug description

When I choose `revealjs` as a `format` for a `qmd` document, it does not render `width` variable from `ojs` properly.
````{qmd}
---
format: revealjs
---
## DEMO

```{ojs}
md`${width}`
```
````
![image](https://user-images.githubusercontent.com/10469752/186004708-b1e97dbf-8c70-4f34-8035-35b9c0de83e2.png)


When I render it as `html`, it works well.
![image](https://user-images.githubusercontent.com/10469752/186004760-8875e7bd-91be-424c-bcf8-f6d1a42ad4ff.png)

OS: mac air m1 Venture 13.0 Beta 22A5321d

### Checklist

- [X] upgraded to the [latest nightly quarto version](https://github.com/quarto-dev/quarto-cli/releases)?
- [ ] [formatted your issue](https://yihui.org/issue/#please-format-your-issue-correctly) so it is easier for us to read?
- [ ] included 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.
- [ ] documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] documented which operating system you're running? If on Linux, please provide the specific distribution as well.
cscheid
2022-08-22T19:45:45Z
kwangkim
bug ojs-engine
v1.2
closed
[revealjs] ojs runtime error: Cannot read properties of null (reading 'clientWidth') from width
https://github.com/quarto-dev/quarto-cli/issues/2058