-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Change error integration test to use fragment based dev-mode inference #1388
Change error integration test to use fragment based dev-mode inference #1388
Conversation
…es instead of the legacy attribute based code path. Also fixes the validator integration test to use the new validator URL and provides for a way to turn on dev mode while a page is embedded into a viewer (through the viewer). Part of ampproject#999
CC @jmadler |
@dvoytenko do you have any concerns? |
@@ -59,11 +59,13 @@ function getMode_() { | |||
// occur during local dev. | |||
!!document.querySelector('script[src*="/dist/"],script[src*="/base/"]'); | |||
|
|||
const overrideDevelopment = parseQueryString(location.hash)['development']; | |||
const overrideDevelopment = parseQueryString( | |||
// location.originalHash is set by the viewer when it removes the fragment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, Viewer also remembers all original args in hash and can return them via getParam(name)
. You can always use this if convenient/possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't want mode.js depend on viewer.
Couple comments, but otherwise LGTM. |
Change error integration test to use fragment based dev-mode inference
instead of the legacy attribute based code path.
Also fixes the validator integration test to use the new validator URL and provides for a way to turn on dev mode while a page is embedded into a viewer (through the viewer).
Part of #999