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

feat: add disableFrame method #39

Merged
merged 3 commits into from
Jul 2, 2020
Merged

feat: add disableFrame method #39

merged 3 commits into from
Jul 2, 2020

Conversation

AdnoC
Copy link
Contributor

@AdnoC AdnoC commented Jun 26, 2020

Issue: dequelabs/axe-devtools-npm#636

Reviewer checks

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

  • Code is reviewed for security

@@ -5,6 +5,7 @@
</head>
<body>
<h1>Foo</h1>
<input type="text" name="firstname" id="firstname">
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the reason for doing this? It doesn't look like it's used in the test you created.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its just to add a violation.

private iframeSelector(): string {
let selector = 'iframe';
for (const disabledFrameSelector of this.disabledFrameSelectors) {
selector += `:not(${disabledFrameSelector})`;
Copy link
Contributor

@straker straker Jun 30, 2020

Choose a reason for hiding this comment

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

This will fail if the selector passed in includes a comma-separated list: disableFrame('#topLevel, #otherLevel') as iframe:not(#topLevel, #otherLevel) is not a valid selector. Is that a problem?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is what we do in attest-webdriverio which also has this method.

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.

2 participants