Method
load
(element: HTMLElement, exampleName: string)
Source from the content-addressed store, hash-verified
| 19 | } |
| 20 | |
| 21 | async load(element: HTMLElement, exampleName: string) { |
| 22 | const config = await this.getConfig(exampleName); |
| 23 | |
| 24 | return sdk.embedProject( |
| 25 | element, |
| 26 | { |
| 27 | title: config.name, |
| 28 | description: config.description, |
| 29 | template: 'node', |
| 30 | files: { |
| 31 | ...config.files, |
| 32 | }, |
| 33 | }, |
| 34 | { |
| 35 | clickToLoad: false, |
| 36 | openFile: config.open, |
| 37 | } |
| 38 | ); |
| 39 | } |
| 40 | |
| 41 | async open(exampleName: string) { |
| 42 | const config = await this.getConfig(exampleName); |
Callers
nothing calls this directly
Tested by
no test coverage detected