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

Problem with jshint #12

Open
georgest opened this issue May 16, 2016 · 0 comments
Open

Problem with jshint #12

georgest opened this issue May 16, 2016 · 0 comments

Comments

@georgest
Copy link

This while (element = element.parentNode) in _elementInDocument function is not accepted by jshint. It shows this error:

Expected a conditional expression and instead saw an assignment.

Can it be done this way:

function _elementInDocument(element) {
    while (true) {
        element = element.parentNode;
        if (element == document) {
            return true;
        }
    }
    return false;
}
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

No branches or pull requests

1 participant