Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

How to handle injected CSS and JS inside of head #52

Open
soulgalore opened this issue Mar 23, 2016 · 1 comment
Open

How to handle injected CSS and JS inside of head #52

soulgalore opened this issue Mar 23, 2016 · 1 comment

Comments

@soulgalore
Copy link
Member

We have a flaw in the system today, the coach don't know if a javascript or css is injected into head. Some of the advice gets screwed by that. We need to discuss how we can fix that, have a couple of ideas and will write them down later today.

@soulgalore
Copy link
Member Author

@tobli and me discussed this offline. As we know there's no way to get the source code from the browser (let us know if you know a way) so we need to do another request to fetch it.

We want to make sure we fetch the HTML in the same session (so we will come in the same "bucket" for optimizely etc so we need to make the request from the browser when we run the javascript to collect the DOM advice. We could fetch the URL using the fetch API (setting the user agent will work right, I tested and it looked ok). What's missing from doing that today, is that the DOM scripts doesn't know anything about the run (they have no configuration = don't know if we are testing as mobile or desktop).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant