Skip to content

[Feature] changing visibilityState #1290

Closed

Description

@kapouer

Being able to change document.visibilityState (and consequently document.hidden) would be nice:

  • to test what some code does when hidden, prerender or visible
  • to test visibilitychange events and how code behave w.r.t. those properties

Activity

  1. kapouer commented on Mar 19, 2020

    @kapouer
    ContributorAuthor

    It should work with
    Object.defineProperty(document, 'visibilityState', {get() { return "prerender";}})
    i don't know why i opened that issue.
    Closing.

  2. abhayp5 commented on Jun 11, 2020

    @abhayp5

    Jérémy Lal (@kapouer) can you please put the snap of the code where you implemented this. Need to do same.

  3. abhayp5 commented on Jun 12, 2020

    @abhayp5

    thank you it really helped. able to achieve using page.evaluateHandle() function.

  4. nowayX commented on Oct 8, 2020

    @nowayX

    Can you tell me how you changed the visibilityState with some code please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions