Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement Element::hasAttributes #10762
Conversation
highfive
commented
Apr 20, 2016
|
Heads up! This PR modifies the following files:
|
|
|
||
| }, 'element.hasAttributes() must return true when the element has attribute.'); | ||
|
|
||
| </script> |
This comment has been minimized.
This comment has been minimized.
| @@ -1335,6 +1335,11 @@ impl ElementMethods for Element { | |||
| self.attr_list.or_init(|| NamedNodeMap::new(&window_from_node(self), self)) | |||
| } | |||
|
|
|||
| // https://dom.spec.whatwg.org/#dom-element-hasattributes | |||
| fn HasAttributes(&self) -> bool { | |||
| self.attrs.borrow().len() > 0 | |||
This comment has been minimized.
This comment has been minimized.
|
@frewsxcv changed, thanks! |
|
There should be failing tests when running
-S-awaiting-review +S-needs-code-changes Reviewed 4 of 4 files at r1, 2 of 2 files at r2. Comments from Reviewable |
|
|
|
@nox Updated, thanks for help :) |
|
|
|
Do you need help rebasing it? |
|
Sorry for delay. Rebased it, thanks! |
|
No problem, that's a very short delay. :) @bors-servo r+ |
|
|
Implement Element::hasAttributes Fixes #10748 . Implement Element::hasAttributes. I'm not sure if tests are enough. I'm open to suggestion :) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10762) <!-- Reviewable:end -->
|
|
canova commentedApr 20, 2016
Fixes #10748 .
Implement Element::hasAttributes. I'm not sure if tests are enough. I'm open to suggestion :)
This change is