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

Add rule to check the web app manifest extension #39

Merged
merged 1 commit into from
Mar 15, 2017
Merged

Add rule to check the web app manifest extension #39

merged 1 commit into from
Mar 15, 2017

Conversation

alrra
Copy link
Contributor

@alrra alrra commented Mar 15, 2017

Rule Details

This rule warns against using non-standard file extensions for the web app manifest file, if the recommended .webmanifest file extension is not used.

While the .webmanifest file extension is not enforced by the specification, nor is it required by browsers, using it makes it:

Resources:


Ref #32

@alrra alrra requested a review from molant March 15, 2017 12:28
/** Finds the Location of an HTMLElement in the document */
const findElementLocation = (element: HTMLElement): ProblemLocation => {

const html = element.ownerDocument.children[0].outerHTML;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@molant Pages usually have content before <html> (e.g.: <!doctype html>), so using element.ownerDocument.children[0].outerHTML is not accurate.

Copy link
Contributor Author

@alrra alrra Mar 15, 2017

Choose a reason for hiding this comment

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

Then find me a better way :)

Already did. I just mention this so you know why I stopped using it.

@molant
Copy link
Member

molant commented Mar 15, 2017

Merging this. I'll probably refactor the findElement portion a bit but this is OK to have it merged and unblock other parts.

@molant molant merged commit 988c107 into webhintio:master Mar 15, 2017
@alrra alrra deleted the web-app-manifest-extension-rule branch March 18, 2017 22:42
alrra added a commit that referenced this pull request Mar 21, 2017
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