Index: Source/WebCore/page/IntersectionObserver.idl |
diff --git a/Source/WebCore/page/IntersectionObserver.idl b/Source/WebCore/page/IntersectionObserver.idl |
index 757de6ee1f02f4f1705e011658b64abfe4528e3b..8176b795f3770761274fb95af18799037d89a392 100644 |
--- a/Source/WebCore/page/IntersectionObserver.idl |
+++ b/Source/WebCore/page/IntersectionObserver.idl |
@@ -27,6 +27,8 @@ |
[ |
Conditional=INTERSECTION_OBSERVER, |
+ ConstructorCallWith=Document, |
+ ConstructorMayThrowException, |
Constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options), |
ImplementationLacksVTable, |
EnabledAtRuntime=IntersectionObserver |
@@ -35,7 +37,8 @@ |
readonly attribute DOMString rootMargin; |
readonly attribute sequence<double> thresholds; |
- void observe(Element target); |
+ // For now, we'll restrict observation to be same-document. If Element is in a different document, this will throw. |
+ [MayThrowException] void observe(Element target); |
void unobserve(Element target); |
void disconnect(); |
sequence<IntersectionObserverEntry> takeRecords(); |