-
Notifications
You must be signed in to change notification settings - Fork 9
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
Initial draft: HTMLPermissionElement definition. #31
Conversation
8b066b7
to
f2df1c6
Compare
3fe0d6c
to
c3e9659
Compare
<dd>{{HTMLPermissionElement/invalidReason}} — Return a string representation of why the element currently cannot be activated.</dd> | ||
<dd>{{HTMLPermissionElement/ondismiss}} — notifies when the user has dismissed the permission prompt.</dd> | ||
<dd>{{HTMLPermissionElement/onresolve}} — notifies when a permission prompt has been answered by the user (positively or negatively).</dd> | ||
<dd>{{HTMLPermissionElement/onvalidationstatuschange}} — notifies when the validation status changes.</dd> |
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.
The generic lang attribute (https://html.spec.whatwg.org/multipage/dom.html#attr-lang) has special significance for the permission element as it will dictate the actual text of the element. I'm not sure if this is to be added here or another section is more appropriate.
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.
lang is part of the global attributes; so I don't we can put them into the IDL bits. I think the solution is to just refer to it in algorithms, then.
Maybe we can add a note to make it more obvious.
permission-element.bs
Outdated
ISSUE: Check attribute & event handler & invalid reason names against | ||
current proposal(s). | ||
|
||
ISSUE: The onvalidationstatuschange event has (Or should have) parameters |
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.
we were thinking that the attributes on the element are sufficient and the developer can use event.target.invalidReason directly. Is it common or good practice to add more info in the event itself (seems redundant to me but I'm uninformed)?
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.
"Common or good practice": No idea, honestly. I'll leave this as-is, for now.
<div algorithm="HTMLPermissionElement/isValid"> | ||
HTMLPermissionElement |element|'s <dfn>isValid</dfn> getter steps are: | ||
|
||
1. Return whether |element|'s [=HTMLPermissionElement/blocker=] is Nothing. |
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 think this is not correct since the list can return expired blockers right?
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 don't think I agree: The blocker algorithm checks for validity.
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.
Had a first-pass, looks very good. Left some feedback on various points. Thank you.
c3e9659
to
f015bf2
Compare
f015bf2
to
aa8baa8
Compare
bbc6296
to
fcd3367
Compare
…orary expiring" blockers in favour of "temporary".
SHA: 1f241e6 Reason: push, by otherdaniel Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: 1f241e6 Reason: push, by otherdaniel Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Initial draft for HTMLPermissionElement.
Currently missing anything around styling, plus a whole lot of explanatory prose.
Preview | Diff