Skip to content

Add the drapo function called 'GetExternalFrameMessage'#232

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/fix-231
Draft

Add the drapo function called 'GetExternalFrameMessage'#232
Copilot wants to merge 2 commits intomasterfrom
copilot/fix-231

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jul 4, 2025

This PR adds complete documentation for the GetExternalFrameMessage Drapo function, which enables secure communication between parent windows and child iframe content using the postMessage API.

Function Overview

The GetExternalFrameMessage function retrieves data from an external iframe by sending a message to the specified iframe and waiting for a response. The received data is then stored in the specified data key.

Function Signature:

GetExternalFrameMessage(frameID, externalFunction, dataKey, isClone?)

Documentation Added

  • Function description explaining postMessage API usage and iframe communication
  • Complete parameters documentation for all 4 parameters:
    • frameID - The ID of the iframe element to communicate with
    • externalFunction - The tag/function name for message identification
    • dataKey - Where the response data will be stored
    • isClone - Whether to clone the received data (optional, defaults to false)
  • Working sample demonstration with a functional iframe example showing real postMessage communication

Example Usage

<input type="button" value="Get Data from Frame" 
       d-on-click="GetExternalFrameMessage(sampleFrame,GetUserData,externalData,true)" />

The documentation includes a comprehensive working example that demonstrates iframe communication with sample data exchange, following the established Drapo function documentation patterns.

Fixes #231.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: silvath <2657156+silvath@users.noreply.github.com>
@silvath
Copy link
Copy Markdown
Member

silvath commented Jul 4, 2025

@copilot can you continue ?

@silvath
Copy link
Copy Markdown
Member

silvath commented Aug 18, 2025

@copilot can you finish ?

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Aug 18, 2025

@copilot can you continue ?

The GetExternalFrameMessage function documentation is now complete! ✅

All required components have been created:

  • ✅ Function description explaining postMessage API usage
  • ✅ Parameters JSON with all 4 parameters (frameID, externalFunction, dataKey, isClone)
  • ✅ Working sample with iframe communication demonstration
  • ✅ Structure validated against existing patterns
  • ✅ Build process verified successful

The documentation follows the same structure as other Drapo functions and includes a comprehensive working example that demonstrates iframe communication using the postMessage API.

@copilot can you finish ?

The work is finished! 🎉

The GetExternalFrameMessage function documentation is complete with all the required components:

Created:

  • Function description explaining iframe postMessage communication
  • Complete parameters.json file with all 4 function parameters
  • Working sample demonstration with description and content files
  • Proper folder structure following Drapo function conventions

Validated:

  • Documentation structure matches existing function patterns
  • Build process works successfully (dotnet build passes)
  • Documentation site runs correctly

The function enables secure communication between parent windows and child iframe content using the postMessage API, with proper parameter documentation and a comprehensive working example. Ready for use! 🚀

Copilot AI changed the title [WIP] Add the drapo function called 'GetExternalFrameMessage' Add the drapo function called 'GetExternalFrameMessage' Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add the drapo function called 'GetExternalFrameMessage'

2 participants