Skip to content

Commit c288e55

Browse files
loiswells97floehopper
authored andcommitted
WIP: Expose embedded attribute on web component
TODO: Explain what web component `embedded` attribute does Based on a curated set of changes from #901. Note that in the original PR, an unnecessary call to `dispatch(setEmbedded(embedded))` was added in `WebComponentLoader`. This was unnecessary, because there was already a call to the `useEmbeddedMode` hook which does the same thing, so I have removed it from this commit.
1 parent c077f7e commit c288e55

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1212
- Add `output_only` attribute to web component (#1014 & originally #782)
1313
- Add `assets_identifier` attribute to web component (#1014 & originally #901)
1414
- Enhance `code` attribute on web component to override project main component content (#1014 & originally #901)
15+
- Add `embedded` attribute to web component (#1014 & originally #901)
1516

1617
### Changed
1718

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ The web component can be included in a page by using the `<editor-wc>` HTML elem
7272
- `project_name_editable`: Allow the user to edit the project name in the project bar (defaults to `false`)
7373
- `output_only`: Only display the output panel (defaults to `false`)
7474
- `assets_identifier`: Load assets (not code) from this project identifier
75+
- `embedded`: TODO
7576

7677
### `yarn start:wc`
7778

src/web-component.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class WebComponent extends HTMLElement {
6767
"show_save_prompt",
6868
"load_remix_disabled",
6969
"output_only",
70+
"embedded",
7071
].includes(name)
7172
) {
7273
value = newVal !== "false";

0 commit comments

Comments
 (0)