{
  "meta": {
    "canonicalUrl": "https://timetostable.com/feature/page-visibility",
    "bcdVersion": "8.1.11",
    "webFeaturesVersion": "3.48.0"
  },
  "kind": "web-feature",
  "webFeature": {
    "id": "page-visibility",
    "name": "Page visibility",
    "description": "The document.visibilityState and document.hidden properties tell you whether the page is visible to the user (for example, it's not minimized or in a background tab).",
    "group": "other",
    "groupName": "other",
    "spec": "https://html.spec.whatwg.org/multipage/interaction.html#page-visibility",
    "baseline": "high",
    "baselineLowDate": "2015-07-29",
    "baselineLowDay": 16645,
    "baselineHighDate": "2018-01-29",
    "compatCount": 3,
    "cats": [
      "api"
    ],
    "compatKeysSample": [
      "api.Document.hidden",
      "api.Document.visibilityState",
      "api.Document.visibilitychange_event"
    ],
    "s": {
      "chrome": {
        "v": "33",
        "d": 16121
      },
      "chrome_android": {
        "v": "33",
        "d": 16127
      },
      "edge": {
        "v": "12",
        "d": 16645
      },
      "firefox": {
        "v": "18",
        "d": 15713
      },
      "firefox_android": {
        "v": "18",
        "d": 15713
      },
      "safari": {
        "v": "7",
        "d": 16000
      },
      "safari_ios": {
        "v": "7",
        "d": 15966
      }
    }
  },
  "relatedBcdFeatures": [
    {
      "id": "api.Document.hidden",
      "cat": "api",
      "mdn": "API/Document/hidden",
      "spec": "https://html.spec.whatwg.org/multipage/interaction.html#dom-document-hidden",
      "st": 1,
      "wf": "page-visibility",
      "bl": "high",
      "bld": 16645,
      "s": {
        "chrome": {
          "v": "33",
          "d": 16121
        },
        "firefox": {
          "v": "18",
          "d": 15713
        },
        "safari": {
          "v": "7",
          "d": 16000
        },
        "edge": {
          "v": "12",
          "d": 16645
        },
        "chrome_android": {
          "v": "33",
          "d": 16127
        },
        "firefox_android": {
          "v": "18",
          "d": 15713
        },
        "safari_ios": {
          "v": "7",
          "d": 15966
        },
        "webview_android": {
          "v": "4.4.3",
          "d": 16223
        },
        "webview_ios": {
          "v": "7",
          "d": 15966
        },
        "samsunginternet_android": {
          "v": "2.0",
          "d": 16360
        },
        "opera": {
          "v": "12.1",
          "d": 15664
        },
        "opera_android": {
          "v": "12.1",
          "d": 15622
        },
        "oculus": {
          "v": "5.0",
          "d": 17713
        },
        "ie": {
          "v": "10",
          "d": 15639
        }
      },
      "notes": [
        {
          "t": "Since Firefox 56 it also returns <code>true</code> on macOS when the window is completely hidden by another non-translucent application.",
          "b": [
            "firefox"
          ]
        },
        {
          "t": "Since Firefox for Android 56 it also returns <code>true</code> on macOS when the window is completely hidden by another non-translucent application.",
          "b": [
            "firefox_android"
          ]
        }
      ]
    },
    {
      "id": "api.Document.visibilityState",
      "cat": "api",
      "mdn": "API/Document/visibilityState",
      "spec": "https://html.spec.whatwg.org/multipage/interaction.html#dom-document-visibilitystate",
      "st": 1,
      "wf": "page-visibility",
      "bl": "high",
      "bld": 16645,
      "s": {
        "chrome": {
          "v": "33",
          "d": 16121
        },
        "firefox": {
          "v": "18",
          "d": 15713
        },
        "safari": {
          "v": "7",
          "d": 16000
        },
        "edge": {
          "v": "12",
          "d": 16645
        },
        "chrome_android": {
          "v": "33",
          "d": 16127
        },
        "firefox_android": {
          "v": "18",
          "d": 15713
        },
        "safari_ios": {
          "v": "7",
          "d": 15966
        },
        "webview_android": {
          "v": "4.4.3",
          "d": 16223
        },
        "webview_ios": {
          "v": "7",
          "d": 15966
        },
        "samsunginternet_android": {
          "v": "2.0",
          "d": 16360
        },
        "opera": {
          "v": "20",
          "d": 16133
        },
        "opera_android": {
          "v": "20",
          "d": 16135
        },
        "oculus": {
          "v": "5.0",
          "d": 17713
        },
        "ie": {
          "v": "10",
          "d": 15639
        }
      }
    },
    {
      "id": "api.Document.visibilitychange_event",
      "cat": "api",
      "mdn": "API/Document/visibilitychange_event",
      "spec": "https://html.spec.whatwg.org/multipage/indices.html#event-visibilitychange",
      "st": 1,
      "wf": "page-visibility",
      "bl": "high",
      "bld": 16645,
      "s": {
        "chrome": {
          "v": "62",
          "d": 17456
        },
        "firefox": {
          "v": "56",
          "d": 17437
        },
        "safari": {
          "v": "14.1",
          "d": 18743
        },
        "edge": {
          "v": "18",
          "d": 17806
        },
        "chrome_android": {
          "v": "62",
          "d": 17463
        },
        "firefox_android": {
          "v": "56",
          "d": 17437
        },
        "safari_ios": {
          "v": "14.5",
          "d": 18743
        },
        "webview_android": {
          "v": "62",
          "d": 17463
        },
        "webview_ios": {
          "v": "14.5",
          "d": 18743
        },
        "samsunginternet_android": {
          "v": "8.0",
          "d": 17730
        },
        "opera": {
          "v": "49",
          "d": 17478
        },
        "opera_android": {
          "v": "46",
          "d": 17665
        },
        "oculus": {
          "v": "5.0",
          "d": 17713
        },
        "ie": {
          "p": [
            "10",
            15639
          ]
        }
      },
      "notes": [
        {
          "t": "The <code>onvisibilitychange</code> event handler property is not supported.",
          "b": [
            "chrome",
            "safari",
            "edge",
            "chrome_android",
            "safari_ios",
            "webview_android",
            "webview_ios",
            "samsunginternet_android",
            "opera",
            "opera_android",
            "oculus",
            "ie"
          ]
        },
        {
          "t": "Doesn't fire the <code>visibilitychange</code> event when navigating away from a document, so also include code to check for the <code>pagehide</code> event (which does fire for that case in all current browsers). See <a href=\"https://webkit.org/b/116769\">bug 116769</a>, <a href=\"https://webkit.org/b/151234\">bug 151234</a>, <a href=\"https://webkit.org/b/151610\">bug 151610</a>, and <a href=\"https://webkit.org/b/194897\">bug 194897</a>.",
          "b": [
            "safari",
            "safari_ios",
            "webview_ios"
          ]
        },
        {
          "t": "Before Safari 14, the event does not bubble, so <code>document.addEventListener('visibilitychange', ...)</code> works, but <code>window.addEventListener('visibilitychange', ...)</code> does not.",
          "b": [
            "safari"
          ]
        },
        {
          "t": "Before Safari on iOS 14, the event does not bubble, so <code>document.addEventListener('visibilitychange', ...)</code> works, but <code>window.addEventListener('visibilitychange', ...)</code> does not.",
          "b": [
            "safari_ios"
          ]
        },
        {
          "t": "Before WebView on iOS 14, the event does not bubble, so <code>document.addEventListener('visibilitychange', ...)</code> works, but <code>window.addEventListener('visibilitychange', ...)</code> does not.",
          "b": [
            "webview_ios"
          ]
        }
      ]
    }
  ]
}