Skip to content
Draft
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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>You can use SetExternalFrameMessage to send data to an external iframe using the postMessage API. This function allows communication between the parent page and an iframe by sending structured messages containing data from Drapo storage.</p>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[
{
"Name": "FrameID",
"Description": "The ID of the iframe element that will receive the message",
"Types": [ "text" ],
"Optional": false
},
{
"Name": "ExternalFunction",
"Description": "The tag or function name that identifies the message purpose in the receiving iframe",
"Types": [ "text" ],
"Optional": false
},
{
"Name": "DataKey",
"Description": "The identification of a storage item whose data will be sent to the iframe",
"Types": [ "datakey" ],
"Optional": false
},
{
"Name": "IsClone",
"Description": "Indicates whether to clone the data before sending. When true, creates a deep copy of the data",
"Types": [ "boolean" ],
"Optional": true,
"DefaultValue": "false"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div d-datakey="users" d-datatype="array" d-dataproperty-name="John" d-dataproperty-age="30"></div>
<div>
<h4>User Data:</h4>
<div d-for="user in users">
<span>Name: {{user.Name}}, Age: {{user.Age}}</span><br />
</div>
<br />
<input type="button" value="Send Data to Frame" d-on-click="SetExternalFrameMessage(myFrame,userData,users,true)" />
<br /><br />
<iframe id="myFrame" src="about:blank" width="400" height="200" style="border: 1px solid #ccc;">
<p>Your browser does not support iframes.</p>
</iframe>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>Send user data to an external iframe with the specified tag for processing or display</p>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<div d-datakey="config" d-datatype="object" d-dataproperty-theme="dark" d-dataproperty-language="en" d-dataproperty-timeout="5000"></div>
<div>
<h4>Application Configuration:</h4>
<p>Theme: {{config.Theme}}</p>
<p>Language: {{config.Language}}</p>
<p>Timeout: {{config.Timeout}}ms</p>
<br />
<input type="button" value="Send Config to Frame (Cloned)" d-on-click="SetExternalFrameMessage(configFrame,configure,config,true)" />
<input type="button" value="Update Theme" d-on-click="UpdateDataField(config,Theme,light)" />
<br /><br />
<iframe id="configFrame" src="about:blank" width="400" height="150" style="border: 1px solid #999;">
<p>Your browser does not support iframes.</p>
</iframe>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>Send configuration data with clone enabled to ensure the iframe receives a copy that cannot affect the parent data</p>