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

Couple of changes to the surrogates page. #58

Merged
merged 4 commits into from
Sep 27, 2021
Merged

Conversation

kdzwinel
Copy link
Member

@kdzwinel kdzwinel commented Sep 24, 2021

  • I added test that just checks if surrogate has loaded in the main frame.
  • And another one that checks the same thing in an iframe.
  • I simplified the table a bit.
  • And cleaned up output format to match the standard.
  • Removed mention of FF bug because it was fixed - https://bugzilla.mozilla.org/show_bug.cgi?id=1694679 (I left the test, just in case)

surrogates

@kdzwinel kdzwinel requested a review from jdorweiler September 24, 2021 23:04
const onMessage = msg => {
if (msg.data.action && msg.data.action === 'surrogate') {
window.parent.postMessage({
surrogate: (window.ga && window.ga.name !== 'N' && window.ga.answer === 42)
Copy link
Member Author

Choose a reason for hiding this comment

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

checks if surrogate has loaded and reports back to the main frame.

}

function checkSurrogate () {
if (window.ga && window.ga.name !== 'N' && window.ga.answer === 42) {
Copy link
Member Author

Choose a reason for hiding this comment

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

this is a simple way of detecting our surrogate

@kdzwinel kdzwinel force-pushed the konrad/surrogates-update branch from 44a01d0 to 0640ec3 Compare September 27, 2021 11:11
@jdorweiler
Copy link
Collaborator

👍

@jdorweiler jdorweiler merged commit 8be7f52 into main Sep 27, 2021
@jdorweiler jdorweiler deleted the konrad/surrogates-update branch September 27, 2021 19:31
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.

2 participants