-
Notifications
You must be signed in to change notification settings - Fork 483
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
Clarifies distinctions between getter and setter methods #656
Conversation
LGTM - cc @jquery/content for a second reviewer please |
$( "h1" ).html( "hello world" ); | ||
``` | ||
|
||
``` | ||
// The .html() method used as a getter: | ||
$( "h1" ).html(); | ||
// The .html() method returns the html from the first h1 element: |
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.
Perhaps better "the html of the first"?
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.
Yup, that sounds better.
I definitely like the proposed text! |
I think it's not actually a "js" exception, but rather a "documentation / content" exception to that rule... We should probably list it on a "Documentation/Content Style Guide" along with the prose rules, etc. Link to and list an exception to the JS Style Guide. |
We do have an open contribute.jquery.org PR that adds a prose/documentation style guide, this will be something to include there. I'm petty sure we had this whole discussion earlier, let me search for it tomorrow. |
I believe this is where we had this discussion: jquery/contribute.jquery.org#75 (comment) We agreed to use |
Thanks for the input. I've updated it to reflect this style. |
I'm totally 👍 here - waiting for someone else to confirm before landing. |
LGTM 👍 |
$( "h1" ).html(); | ||
// > "hello world" | ||
|
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.
Why is this empty line here?
Fixes gh-655