blob: fa93787bb29a0f22d08310027d41c827ddc8eaf3 [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// TODO(szager): Update the doc link when the spec has an official home; for now it's:
// https://github.com/WICG/IntersectionObserver
callback IntersectionObserverCallback = void (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer);
[
CustomConstructor(IntersectionObserverCallback callback, IntersectionObserverInit options),
Custom=VisitDOMWrapper,
MeasureAs=IntersectionObserver_Constructor,
RuntimeEnabled=IntersectionObserver,
] interface IntersectionObserver {
[RaisesException] void observe(Element target);
[RaisesException] void unobserve(Element target);
[RaisesException] void disconnect();
[RaisesException] sequence<IntersectionObserverEntry> takeRecords();
readonly attribute Element? root;
readonly attribute DOMString rootMargin;
readonly attribute FrozenArray<double> thresholds;
};