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

fix(cli): Enable program to work with pkg #48

Merged
merged 6 commits into from
Jul 14, 2020
Merged

Conversation

michael-siek
Copy link
Member

@michael-siek michael-siek commented Jul 9, 2020

See: https://github.com/dequelabs/axe-devtools-npm/issues/715

Reviewer checks

Required fields, to be filled out by PR reviewer(s)

  • Code is reviewed for security

@michael-siek michael-siek requested a review from a team July 9, 2020 23:14
Comment on lines 33 to 35
const callback = arguments[arguments.length-1]
const script = document.createElement('script')
script.innerHTML = 'document.documentElement.classList.add("deque-axe-is-ready");'
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets make sure this can continue to work on IE:

Suggested change
const callback = arguments[arguments.length-1]
const script = document.createElement('script')
script.innerHTML = 'document.documentElement.classList.add("deque-axe-is-ready");'
var callback = arguments[arguments.length-1]
var script = document.createElement('script')
script.innerHTML = 'document.documentElement.classList.add("deque-axe-is-ready");'

Copy link
Member

Choose a reason for hiding this comment

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

The CLI program relies on @axe-core/webdriverjs, which uses Array#from, global.Promise, "arrow functions" and other JS features that do not work in IE. I do not think this change is necessary, since this program doesn't work in IE to begin with.

Copy link
Contributor

@WilcoFiers WilcoFiers left a comment

Choose a reason for hiding this comment

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

See comment

@stephenmathieson stephenmathieson changed the title fix(cli): pass in string into executeAsyncScript instead of function fix(cli): Enable program to work with pkg Jul 10, 2020
Copy link
Member

@stephenmathieson stephenmathieson left a comment

Choose a reason for hiding this comment

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

Just like #49, please add comments and link to the relevant issue.

Copy link
Member

@stephenmathieson stephenmathieson left a comment

Choose a reason for hiding this comment

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

Small thing

packages/cli/lib/axe-test-urls.js Outdated Show resolved Hide resolved
Co-authored-by: Stephen Mathieson <me@stephenmathieson.com>
@michael-siek michael-siek merged commit a9ccea6 into develop Jul 14, 2020
@michael-siek michael-siek deleted the fix-async-script branch July 14, 2020 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants