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

Is. #879: add loading attribute for img, iframe #902

Merged
merged 1 commit into from
Nov 21, 2020
Merged

Is. #879: add loading attribute for img, iframe #902

merged 1 commit into from
Nov 21, 2020

Conversation

sidvishnoi
Copy link
Contributor

Fixes #879

Test input
<!DOCTYPE html>
<html lang="en">
<head>
  <title>Document</title>
</head>
<body>
  <img src="foo" loading="lazy" alt="PASS">
  <img src="foo" loading="eager" alt="PASS">
  
  <iframe src="foo" loading="lazy">PASS</iframe>
  <iframe src="foo" loading="eager">PASS</iframe>
  
  <div loading="lazy">FAIL</div>
  <iframe src="foo" loading="what">FAIL</iframe>
  <img src="foo" loading="what" alt="FAIL">
  <img src="foo" loading="" alt="FAIL">
</body>
</html>
tidy -q test.html > /dev/null
line 7 column 3 - Warning: <img> proprietary attribute "loading"
line 8 column 3 - Warning: <img> proprietary attribute "loading"
line 10 column 3 - Warning: <iframe> proprietary attribute "loading"
line 11 column 3 - Warning: <iframe> proprietary attribute "loading"
line 13 column 3 - Warning: <div> proprietary attribute "loading"
line 14 column 3 - Warning: <iframe> proprietary attribute "loading"
line 15 column 3 - Warning: <img> proprietary attribute "loading"
line 16 column 3 - Warning: <img> proprietary attribute "loading"
./build/cmake/tidy -q test.html > /dev/null
line 14 column 3 - Warning: <iframe> attribute "loading" has invalid value "what"
line 15 column 3 - Warning: <img> attribute "loading" has invalid value "what"
line 16 column 3 - Warning: <img> attribute "loading" lacks value
line 13 column 3 - Warning: <div> proprietary attribute "loading"

@sidvishnoi sidvishnoi changed the title Is. 879: add loading attribute for img, iframe Is. #879: add loading attribute for img, iframe Oct 25, 2020
@geoffmcl
Copy link
Contributor

@sidvishnoi thank you for this PR...

Except for the fact that you inserted the TidyAttr_LOADING alphabetically, in tidyenum.h, it looks good...

I know the present docs says Please try to keep this enumeration in alphabetical order., but doing that would mean bumping the SOVERSION number for every change. See #851, and the many mentions of this in other comments here...

But no problem, this can be dealt with at the time of the merge, if I've got all the facts straight...

Again, thank you for the PR... will try to get to it soonest...

@geoffmcl geoffmcl merged commit e5ef43f into htacg:next Nov 21, 2020
geoffmcl added a commit that referenced this pull request Nov 21, 2020
geoffmcl added a commit that referenced this pull request Nov 21, 2020
@sidvishnoi sidvishnoi deleted the loading-attr branch November 22, 2020 18:34
geoffmcl added a commit that referenced this pull request Nov 24, 2020
Error made when merging LOADING Is. #879, PR #902

And merging SLOT PR #848

Also added a BIG warning over attribute_defs table to try to avoid this
in future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<img> proprietary attribute "loading"
2 participants