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

Initial commit for #279. #381

Merged
merged 8 commits into from
Jul 26, 2022
Merged

Initial commit for #279. #381

merged 8 commits into from
Jul 26, 2022

Conversation

cynthia
Copy link
Member

@cynthia cynthia commented Jul 26, 2022

There needs to be some extra details fleshed out.


Preview | Diff

index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
Copy link
Contributor

@hober hober left a comment

Choose a reason for hiding this comment

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

Looks good! Here are some nits.

index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated
should always have a corresponding IDL attribute with the same name,
and the state between the two should be kept synchronized.
Carving out a synchronized IDL attribute with inconsistent naming
results in confusion, and should be avoided at all costs.
Copy link
Member

Choose a reason for hiding this comment

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

This needs an example.

Copy link
Member

Choose a reason for hiding this comment

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

And we should definitely mention the classic examples of <input value> / <input checked> somewhere in this.

Copy link
Member Author

Choose a reason for hiding this comment

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

See: 357a8da


<div class="note">
This does not hold the other way around.
A new IDL attribute does not always warrant a content attribute counterpart.
Copy link
Member

Choose a reason for hiding this comment

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

This needs an example of an IDL attribute that does not correspond to an HTML attribute.

cynthia and others added 5 commits July 26, 2022 11:03
Co-authored-by: Lea Verou <[email protected]>
Co-authored-by: Theresa O'Connor <[email protected]>
Co-authored-by: Theresa O'Connor <[email protected]>
Co-authored-by: Theresa O'Connor <[email protected]>
index.bs Outdated Show resolved Hide resolved
should have a corresponding IDL attribute with the same name,
and the state between the two should be kept synchronized.
Carving out a synchronized IDL attribute with inconsistent naming
results in confusion, and should be avoided.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
results in confusion, and should be avoided.
results in confusion, and should be avoided.
<div class=example>
The <{input}> element has <{input/value}> and <{input/checked}> attributes that hold the default state of the element.
There are also {{HTMLInputElement/value}} and {{HTMLInputElement/checked}} that hold the *current* state of the element.
The fact that these are not synchronized, and despite the same name, they actually hold different data, has caused authors a lot of confusion.
</div>

Copy link
Member

@ylafon ylafon left a comment

Choose a reason for hiding this comment

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

LGTM

@cynthia cynthia merged commit d451ed0 into main Jul 26, 2022
@LeaVerou LeaVerou deleted the cynthia/279 branch July 26, 2022 12:34
hober added a commit that referenced this pull request Apr 20, 2023
* Initial commit for #279.

* Update index.bs

Co-authored-by: Lea Verou <[email protected]>

* Update index.bs

Co-authored-by: Theresa O'Connor <[email protected]>

* Update index.bs

Co-authored-by: Theresa O'Connor <[email protected]>

* Update index.bs

Co-authored-by: Theresa O'Connor <[email protected]>

* Added counterpattern examples.

* Update index.bs

Co-authored-by: Lea Verou <[email protected]>

Co-authored-by: Lea Verou <[email protected]>
Co-authored-by: Theresa O'Connor <[email protected]>
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.

4 participants