-
Notifications
You must be signed in to change notification settings - Fork 541
fix: More explicit error message when DOM selector is invalid #109
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
@@ -1,13 +1,21 @@ | |||
function getContainerNode(selectorOrHTMLElement) { | |||
if (typeof selectorOrHTMLElement === 'string') { | |||
return document.querySelector(selectorOrHTMLElement); | |||
var isFromString = (typeof selectorOrHTMLElement === 'string'); |
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.
Is there a need for parenthesis here?
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.
Seems they are not needed indeed
Great, only waiting for comment on (type of) |
They might not be needed, but I feel they improve readability. |
Ok no preference here |
LGTM |
fix: More explicit error message when DOM selector is invalid
When you click these buttons in latest Chrome, it will keep those buttons on the same place in the viewport, which means that users will skip the next page of results. With this property added, that's fixed. This solution comes from https://bugs.chromium.org/p/chromium/issues/detail?id=1110323#c1 and has been verified by three customers so far.
When you click these buttons in latest Chrome, it will keep those buttons on the same place in the viewport, which means that users will skip the next page of results. With this property added, that's fixed. This solution comes from https://bugs.chromium.org/p/chromium/issues/detail?id=1110323#c1 and has been verified by three customers so far.
Fixes #105