File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -816,11 +816,13 @@ export const LegacyElementMixin = dedupingMixin((base) => {
816816 * @param {string } name HTML attribute name
817817 * @param {boolean= } bool Boolean to force the attribute on or off.
818818 * When unspecified, the state of the attribute will be reversed.
819- * @param {Element= } node Node to target. Defaults to `this`.
820819 * @return {boolean } true if the attribute now exists
821820 */
822- toggleAttribute ( name , bool , node ) {
823- node = /** @type {Element } */ ( node || this ) ;
821+ toggleAttribute ( name , bool ) {
822+ let node = /** @type {Element } */ this ;
823+ if ( arguments . length === 3 ) {
824+ node = /** @type {Element } */ arguments [ 2 ] ;
825+ }
824826 if ( arguments . length == 1 ) {
825827 bool = ! node . hasAttribute ( name ) ;
826828 }
You can’t perform that action at this time.
0 commit comments