-
Notifications
You must be signed in to change notification settings - Fork 27.4k
docs(jqLite): document append doesn't work well with a multi-node object #16517
Conversation
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.
small grammatical suggestion
src/jqLite.js
Outdated
@@ -54,7 +54,7 @@ | |||
* | |||
* - [`addClass()`](http://api.jquery.com/addClass/) - Does not support a function as first argument | |||
* - [`after()`](http://api.jquery.com/after/) | |||
* - [`append()`](http://api.jquery.com/append/) | |||
* - [`append()`](http://api.jquery.com/append/) (contrary to jQuery doesn't clone elements so will not work correctly when invoked on a jqLite object containing more than one DOM node) |
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.
(contrary to JQuery, this doesn't...
?
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.
Makes sense (just jQuery
, not JQuery
) ;)
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.
PR updated.
src/jqLite.js
Outdated
@@ -54,7 +54,7 @@ | |||
* | |||
* - [`addClass()`](http://api.jquery.com/addClass/) - Does not support a function as first argument | |||
* - [`after()`](http://api.jquery.com/after/) | |||
* - [`append()`](http://api.jquery.com/append/) | |||
* - [`append()`](http://api.jquery.com/append/) (contrary to jQuery, this doesn't clone elements so will not work correctly when invoked on a jqLite object containing more than one DOM node) |
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.
Could you break the line at 100 characters and use the same format as the other notes, i.e. - contrary ...
instead of (contrary ..)
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 don't break jqLite method descriptions at all, see some of the descriptions below. I changed the format to match others, PR updated.
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.
It's still easier to read them when they break at 100 chars. And I think it doesn't affect the eventual layout. And it also makes @gkalpak sad 😁
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.
Updated but note that in the jqLite methods list 9 lines already don't fit in the 100 chars limit. :P
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'll just add I'd never want to make @gkalpak sad!
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.
This has been a real emotional roller-coaster for me. But I'm very excited about the happy ending.
❤️ ➕ 🤗
Contrary to jQuery jqLite's append doesn't clone elements so will not work correctly when invoked on a jqLite object containing more than one DOM node. Refs angular#11446
Contrary to jQuery jqLite's append doesn't clone elements so will not work
correctly when invoked on a jqLite object containing more than one DOM node.
Refs #11446
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Docs update
What is the current behavior? (You can also link to an open issue here)
#11446 (it documents the existing difference from jQuery)
What is the new behavior (if this is a feature change)?
N/A
Does this PR introduce a breaking change?
No.
Please check if the PR fulfills these requirements
Fix/Feature: Docs have been added/updatedFix/Feature: Tests have been added; existing tests passOther information: