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

implement native toggleAttribute signature #5370

Merged
merged 2 commits into from
Oct 8, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/legacy/legacy-element-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ export const LegacyElementMixin = dedupingMixin((base) => {
* @param {boolean=} bool Boolean to force the attribute on or off.
* When unspecified, the state of the attribute will be reversed.
* @param {Element=} node Node to target. Defaults to `this`.
* @return {void}
* @return {boolean}
Copy link
Contributor

Choose a reason for hiding this comment

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

/home/travis/build/Polymer/polymer/lib/legacy/legacy-element-mixin.js
  813:5  error  Missing JSDoc return description  valid-jsdoc

*/
toggleAttribute(name, bool, node) {
node = /** @type {Element} */ (node || this);
Expand All @@ -826,8 +826,10 @@ export const LegacyElementMixin = dedupingMixin((base) => {
}
if (bool) {
node.setAttribute(name, '');
return true;
} else {
node.removeAttribute(name);
return false;
}
}

Expand Down