You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
In 'HTMLElement.classList.toggle' the 'force' attribute works uncorrectly. #277
In this example, if the 'force' attribute is not passed to the 'toggle' function, 'linkedom' will interpret it as being passed an attribute equal to 'undefined' and identify it as a 'false' value.
The correct way is for 'linkedom' to ignore the 'force' attribute if it is 'undefined'.
Everything works fine in the browser.
Аnd also in 'linkedom' everything works correctly if I do this check myself:
Taking this: I'll treat DOMTokenList.toggle(token, force) so that force === undefined matches an omitted second argument (plain toggle), per browsers / Web IDL optional boolean. force true/false will still force-add / force-remove.
I didn't find an open PR with Exact Fixes #277 / Closes #277. Will open a focused PR against main.
Activity
dyk1454683243-sudo commentedon Sep 20, 2026
Taking this: I'll treat
DOMTokenList.toggle(token, force)so thatforce === undefinedmatches an omitted second argument (plain toggle), per browsers / Web IDL optional boolean.forcetrue/false will still force-add / force-remove.I didn't find an open PR with Exact
Fixes #277/Closes #277. Will open a focused PR againstmain.dyk1454683243-sudo commentedon Sep 20, 2026
Opened #334 against
main—toggle(token, undefined)now matches omittedforce(plain toggle).