-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
core(doctype): check document.compatMode for quirks mode #12978
Conversation
- new check is added in `doctype` audit for checking `compatMode` of document - `getDoctype` function in `gatherer` is also altered to return compatMode - `Doctype` interface is also changed to return `compatMode` as string in `artifacts.d.ts`
quirks-mode
check is added in doctype audit
I changed the |
types/artifacts.d.ts
Outdated
@@ -17,11 +17,11 @@ type _TaskNode = import('../lighthouse-core/lib/tracehouse/main-thread-tasks.js' | |||
import AuditDetails from './lhr/audit-details' | |||
import Config from './config'; | |||
import Gatherer from './gatherer'; | |||
import {IcuMessage} from './lhr/i18n'; | |||
import { IcuMessage } from './lhr/i18n'; |
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.
would you revert all of these formatting changes please? makes it hard to tell what the underlying change is :)
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.
My IDE automatically converted these I will change them back!
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.
I was not able to revert it. But I deleted that file and made another commit with the required changes only.
…nto quirk-mode-check
…nto quirk-mode-check
Hey @k99sharma would you be able to fix the merge conflicts? |
i took care of 'em. and fixed up a few other pieces. |
|
||
// Catch-all for any quirks-mode situations the above checks didn't get. | ||
// https://github.com/GoogleChrome/lighthouse/issues/10030 | ||
if (compatMode === 'BackCompat') { |
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.
I'm thinking we should just only check this.
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.
Actually... I guess the specific messages are better for diagnosing. nevermind.
Summary
This change adds a new check in
doctype
audit forcompatMode
of the document. It is needed to check forquirks-mode
of the document.I read about quirks-mode check in this MDN doc: doc
Related Issues/PRs
Issue no: #10030