-
Notifications
You must be signed in to change notification settings - Fork 473
Effects: Don't warn about interval if document is hidden #298
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
|
The spec mentions On the other hand, I'd rather avoid us preventing the |
|
Wait, |
|
We could switch I suppose. Most likely |
mgol
left a comment
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.
Makes sense.
|
Mm, my understanding that if document is hidden we still use this property, is there intention to replace such logic? |
|
@markelog The issue is |
That's not what I meant :). I am talking about |
|
Okay, I see your point here – #292 (comment) I think we might want to show the warning only when this property is set – not on the getter |
|
@markelog That's one solution but a warning for the getter makes sense as well as we don't want people to rely on this value. |
|
We used as a getter, it still has fully legitimated use, but one might argue that should not be changed, that's how I see it. But of course you can do whatever you want here :) |
|
I'm going to keep the getter in case someone happens to read it in their own code. Our helpful friends at StackOverflow (😭) often seem to think it will fix some problem or another, although most involve assigning some horribly large or small value. |
That's an explanation to keep the setter? Well, whatever, forget it, I don't want to argue about it |
|
@markelog not arguing at all, just letting you know that I wanted to keep the getter. This PR will eliminate the false positive for now and we can change core later. |
|
Landed at 758a138 |
Fixes #292
This seems like the easiest way to avoid the spurious error. There's no change to the tests because the current tests fire as they did before, the document isn't hidden. The test is already skipped for IE9 but if it wasn't then
document.hiddenwould be falsy there anyway.In the latest spec it looks like
document.hiddenhas been somewhat obsoleted but is still supported.