MCPcopy Create free account
hub / github.com/zhongsp/TypeScript / playground_text

Function playground_text

docs/book.js:7–18  ·  view source on GitHub ↗
(playground, hidden = true)

Source from the content-addressed store, hash-verified

5
6// Global variable, shared between modules
7function playground_text(playground, hidden = true) {
8 let code_block = playground.querySelector("code");
9
10 if (window.ace && code_block.classList.contains("editable")) {
11 let editor = window.ace.edit(code_block);
12 return editor.getValue();
13 } else if (hidden) {
14 return code_block.textContent;
15 } else {
16 return code_block.innerText;
17 }
18}
19
20(function codeSnippets() {
21 function fetch_with_timeout(url, options, timeout = 6000) {

Callers 3

update_play_buttonFunction · 0.85
run_rust_codeFunction · 0.85
book.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected