Skip to content

Commit 6c27cb3

Browse files
Merge pull request #1075 from akeneo/DXIM-41
2 parents 3ef0107 + 8ff10bf commit 6c27cb3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

content/extensions/types.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,24 @@ Example :
159159
}
160160
```
161161

162+
### Reloading the parent page from the iframe
163+
164+
In some cases, after executing an action within the iframe, you may need to refresh the parent PIM page to reflect the changes made. Due to browser security constraints, direct access to the parent window is restricted.
165+
166+
To address this, we provides a mechanism to trigger a page reload via a PostMessage. To initiate a reload of the parent page, simply send a message from the iframe with the following structure:
167+
168+
```js
169+
window.parent.postMessage(
170+
{
171+
type: 'reload_parent'
172+
},
173+
"*"
174+
);
175+
```
176+
177+
This message will trigger a page reload in the PIM.
178+
179+
162180
### Ensuring security of embedded iframes
163181

164182
To help ensuring the security of iframes we recommand using these two solutions:

0 commit comments

Comments
 (0)