quarto-dev / quarto-dev/quarto-cli
How to use Observable code and "this" in Quarto ojs cell?
Open
@cscheid is already working on this.
Since Jun 17, 2024.
bug
ojs-engine
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
(I think this is a bug in our OJS implementation.)
Discussed in https://github.com/quarto-dev/quarto-cli/discussions/10032
Originally posted by Juuso1 June 16, 2024
Description
I try to copy this code (https://observablehq.com/@fil/whats-this) to Quarto document, but I can´t see nothing. Only Replay button an this one "Object {value: NaN}" ? What should I do?
viewof replay = html`<button>replay`
{
replay;
mutable that = this;
if (this) yield { value: this.value + 1 };
else yield { value: 0 };
}
mutable that = undefined
Br, Juuso
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.