-
Notifications
You must be signed in to change notification settings - Fork 9
feat: getElementsByName #45
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
Conversation
@@ -281,6 +295,12 @@ function attachSourceIfNecessary ({ nodes }, selector) { | |||
} | |||
} | |||
|
|||
function assertIsDocumentOrShadowRoot (context) { | |||
if (context.nodeType !== 11 && context.nodeType !== 9) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized duck typing this will be a cleaner approach and work across windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a small nit about tests
] | ||
assertResultEqual(name, getElementsByName(name, context), expected, true) | ||
|
||
name = 'test' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just as a sanity check, can we test for names like tEsT
and ensure that it doesn't match? (Looks like getElementsByName
is case-sensitive.)
3e4341e
to
70e6598
Compare
Adds support for
Document.getElementsByName