Skip to content
This repository has been archived by the owner on May 9, 2022. It is now read-only.

queryState doesn't take arguments? #23

Open
mindplay-dk opened this issue Jun 9, 2016 · 1 comment
Open

queryState doesn't take arguments? #23

mindplay-dk opened this issue Jun 9, 2016 · 1 comment

Comments

@mindplay-dk
Copy link

I'm confused about this line, specifically this call:

command.queryState(button.dataset.commandValue)

As far as I can tell, none of the queryState implementations accept an argument:

In the browser API (to which these command implementations delegate) it appears this isn't supported either - while document.execCommand() does accept a command value argument, execCommand() does not:

https://developer.mozilla.org/en-US/docs/Web/API/Document/queryCommandState

Am I correct that passing this argument has no effect and was done by mistake?

Or is there some external/third-party command implementation that I don't know about, where this may be used for something?

@rrees
Copy link
Contributor

rrees commented Jun 9, 2016

See PR #13 for the details of why this was added, it's not something that's used in the Guardian's codebase.

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

No branches or pull requests

2 participants