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

Trim input parameters to HTML hooks #436

Merged
merged 2 commits into from
Nov 4, 2020
Merged

Conversation

domenic
Copy link
Contributor

@domenic domenic commented Jul 17, 2020

These algorithms do not need as many parameters as they are currently declared to take. This removes the redundant parameters so that HTML can stop supplying them, which helps with whatwg/html#1130.


Preview | Diff

These algorithms do not need as many parameters as they are currently declared to take. This removes the redundant parameters so that HTML can stop supplying them, which helps with whatwg/html#1130.
@annevk
Copy link
Member

annevk commented Nov 4, 2020

@domenic still want to merge this? I'm happy to do it.

index.src.html Outdated
@@ -1348,13 +1348,12 @@ <h4 id="should-block-inline" algorithm>
</ol>

<h4 id="should-block-navigation-request" algorithm>
Copy link
Member

Choose a reason for hiding this comment

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

We should also export this and the one below, even though HTML doesn't strictly need that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not clear how to do that since there's no <dfn>...

Copy link
Member

Choose a reason for hiding this comment

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

You can put them directly on the h4 as I understand it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've tested and that will indeed add a data-export attribute, but there's no data-dfn-type attribute, so I'm pretty sure they still won't show up in any linking databases. (Per https://tabatkins.github.io/bikeshed/#dfn-contract .)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can also check that they don't show up in https://w3c.github.io/webappsec-csp/#index-defined-here

Copy link
Member

Choose a reason for hiding this comment

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

I guess per https://tabatkins.github.io/bikeshed/#dfn-contract it would also require dfn? Is this using the algorithm attribute incorrectly then? This document is such a mess...

Copy link
Member

Choose a reason for hiding this comment

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

(I care as I also need to update this for Fetch.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yeah, adding dfn seems to help. I'll do that, I guess...

@domenic
Copy link
Contributor Author

domenic commented Nov 4, 2020

Yes, merging this would be great!

domenic added a commit to whatwg/html that referenced this pull request Nov 4, 2020
@annevk annevk merged commit 787d240 into w3c:master Nov 4, 2020
@domenic domenic deleted the no-source-bc branch November 4, 2020 18:07
domenic added a commit to whatwg/html that referenced this pull request Nov 4, 2020
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.

3 participants