Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send QueryId to the Parent for iframe integrations #880

Merged
merged 2 commits into from
Jul 13, 2021

Conversation

cea2aj
Copy link
Member

@cea2aj cea2aj commented Jul 13, 2021

Add a iframe-messaging script partial which can be used to send messages to the parent site in iframe integrations

The iframe-common.js script must be overridden in order to listen to these queryId messages.

J=SLAP-1439
TEST=manual

Override the iframe-common script and print all messages received by the parent frame. Observe a message being received on every search which includes the queryId.

@coveralls
Copy link

coveralls commented Jul 13, 2021

Coverage Status

Coverage remained the same at 6.672% when pulling 934f955 on dev/query-id-messaging into aa3fffd on develop.

@cea2aj cea2aj added the WIP label Jul 13, 2021
* and the iFrameResize onMessage function must be modified.
*/

ANSWERS.core.storage.registerListener({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outside the scope of this PR, but I might make an item to have a top-level registerListener on ANSWERS. That way, we're not adding references to implementation details like ANSWERS.core.storage. The cat's already out of the bag, the Theme is using that other places. But, if we have a top-level ANSWERS method, might save us some trouble if we ever change internal storage details.

@cea2aj cea2aj merged commit d1c09b8 into develop Jul 13, 2021
@cea2aj cea2aj deleted the dev/query-id-messaging branch July 13, 2021 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants