blob: c263fccb5561ca09a7440c741cd8c2009c68b00e [file] [log] [blame]
// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
callback IntersectionObserverCallback = void (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer);
] interface IntersectionObserver {
[CallWith=ScriptState, RaisesException, MeasureAs=IntersectionObserver_Constructor] constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options = {});
readonly attribute Node? root;
readonly attribute DOMString rootMargin;
readonly attribute FrozenArray<double> thresholds;
readonly attribute DOMHighResTimeStamp delay;
readonly attribute boolean trackVisibility;
[RaisesException] void observe(Element target);
[RaisesException] void unobserve(Element target);
[RaisesException] void disconnect();
[RaisesException] sequence<IntersectionObserverEntry> takeRecords();