Spec here: https://www.w3.org/TR/page-visibility-2/#onvisiblitychange-event-handler We currently support the visibilitychange event, but not the onvisibilitychange event handler. Based on https://w3ctag.github.io/design-principles/#always-add-event-handlers, we should always have an event handler.
Is this only for document? Should we also add it for Element, DomWindow and Window?
Document only: https://w3c.github.io/page-visibility/#extensions-to-the-document-interface
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f9393907faa18ba1dd33a35b231c433f3c42ca4d commit f9393907faa18ba1dd33a35b231c433f3c42ca4d Author: Liquan (Max) Gu <maxlg@chromium.org> Date: Mon Aug 21 21:29:42 2017 [page-visibility] Implement onvisibilitychange event handler This CL is to implement onvisibilitychange for Document. This will allow 'visibilitychange' to be an event that Document can listen to. Bug: 739345 Change-Id: If6882717be45f0ece2a89516a3593458903b2952 Reviewed-on: https://chromium-review.googlesource.com/612043 Reviewed-by: Philip Jägenstedt <foolip@chromium.org> Commit-Queue: Liquan Gu <maxlg@chromium.org> Cr-Commit-Position: refs/heads/master@{#496065} [modify] https://crrev.com/f9393907faa18ba1dd33a35b231c433f3c42ca4d/third_party/WebKit/LayoutTests/TestExpectations [delete] https://crrev.com/4f0fdf29ee5db0df2e0d0b03c1ca1097e6d65ce2/third_party/WebKit/LayoutTests/external/wpt/page-visibility/idlharness-expected.txt [modify] https://crrev.com/f9393907faa18ba1dd33a35b231c433f3c42ca4d/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt [modify] https://crrev.com/f9393907faa18ba1dd33a35b231c433f3c42ca4d/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt [modify] https://crrev.com/f9393907faa18ba1dd33a35b231c433f3c42ca4d/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt [modify] https://crrev.com/f9393907faa18ba1dd33a35b231c433f3c42ca4d/third_party/WebKit/Source/core/dom/Document.h [modify] https://crrev.com/f9393907faa18ba1dd33a35b231c433f3c42ca4d/third_party/WebKit/Source/core/dom/Document.idl
Comment 1 by igrigo...@google.com
, Jul 5 2017Labels: Hotlist-PerformanceAPIs
Summary: [page-visibility] Implement onvisibilitychange event handler. (was: Implement onvisibilitychange event handler.)