Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Example of use:
The ediTDor can receive a Thing Description from another web application through the browser `postMessage` API (Documentation [here](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage)). When ediTDor is opened by another application in a new window or tab, it sends a readiness message back to the opener:

```json
{ "type": "EDITDOR_READY" }
{ "type": "APPLICATION_READY" }
```

After that, the parent application can send a Thing Description to ediTDor with a message in the following format:
Expand Down
4 changes: 2 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import ErrorDialog from "./components/Dialogs/ErrorDialog";
import DialogTemplate from "./components/Dialogs/DialogTemplate";

type ReadyMessage = {
type: "EDITDOR_READY";
type: "APPLICATION_READY";
};

type LoadTdMessage = {
Expand Down Expand Up @@ -184,7 +184,7 @@ const App = () => {

useEffect(() => {
const readyMessage: ReadyMessage = {
type: "EDITDOR_READY",
type: "APPLICATION_READY",
};

const handleMessage = (event: MessageEvent) => {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/App.integration.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ describe("App component receive message from other application", () => {

expect(openerRef.postMessage).toHaveBeenCalledWith(
{
type: "EDITDOR_READY",
type: "APPLICATION_READY",
},
"*"
);
Expand Down
Loading