Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

fix(jqLite.attr): ignore comment, text and attribute nodes when setting/... #11275

Closed
wants to merge 1 commit into from
Closed

fix(jqLite.attr): ignore comment, text and attribute nodes when setting/... #11275

wants to merge 1 commit into from

Conversation

RobiFerentz
Copy link
Contributor

...getting attributes

follow jQuery handling of the attr function

Fixes #11038

@@ -587,6 +587,9 @@ forEach({
},

attr: function(element, name, value) {
if (element.nodeType === 2 || element.nodeType === 3 || element.nodeType === 8) {
Copy link
Contributor

Choose a reason for hiding this comment

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

  • please use NODE_TYPE_TEXT and NODE_TYPE_COMMENT, for nodeType === 2, please create NODE_TYPE_ATTRIBUTE to src/Angular.js and use it
  • add var nodeType = element.nodeType and do the comparison to it

@lgalfaso
Copy link
Contributor

otherwise, LGTM

…ng/getting attributes

follow jQuery handling of the attr function

Fixes #11038
@RobiFerentz
Copy link
Contributor Author

Done. 😆

@lgalfaso
Copy link
Contributor

landed as bb5bf7f

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JQLite issue setting attributes on comments ¯\_(ツ)_/¯
3 participants