LEFT | RIGHT |
1 /* | 1 /* |
2 * Copyright (C) 2016 Apple Inc. All rights reserved. | 2 * Copyright (C) 2016 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 19 matching lines...) Expand all Loading... |
30 ConstructorCallWith=Document, | 30 ConstructorCallWith=Document, |
31 ConstructorMayThrowException, | 31 ConstructorMayThrowException, |
32 Constructor(IntersectionObserverCallback callback, optional IntersectionObse
rverInit options), | 32 Constructor(IntersectionObserverCallback callback, optional IntersectionObse
rverInit options), |
33 ImplementationLacksVTable, | 33 ImplementationLacksVTable, |
34 EnabledAtRuntime=IntersectionObserver | 34 EnabledAtRuntime=IntersectionObserver |
35 ] interface IntersectionObserver { | 35 ] interface IntersectionObserver { |
36 readonly attribute Element? root; | 36 readonly attribute Element? root; |
37 readonly attribute DOMString rootMargin; | 37 readonly attribute DOMString rootMargin; |
38 readonly attribute sequence<double> thresholds; | 38 readonly attribute sequence<double> thresholds; |
39 | 39 |
40 // For now, we'll restrict observation to be same-document. If Element is in
a different document, this will throw. | 40 void observe(Element target); |
41 [MayThrowException] void observe(Element target); | |
42 void unobserve(Element target); | 41 void unobserve(Element target); |
43 void disconnect(); | 42 void disconnect(); |
44 sequence<IntersectionObserverEntry> takeRecords(); | 43 sequence<IntersectionObserverEntry> takeRecords(); |
45 }; | 44 }; |
46 | 45 |
47 [ | 46 [ |
48 Conditional=INTERSECTION_OBSERVER, | 47 Conditional=INTERSECTION_OBSERVER, |
49 EnabledBySetting=IntersectionObserver | 48 EnabledBySetting=IntersectionObserver |
50 ] | 49 ] |
51 dictionary IntersectionObserverInit { | 50 dictionary IntersectionObserverInit { |
52 Element? root = null; | 51 Element? root = null; |
53 DOMString rootMargin = "0px"; | 52 DOMString rootMargin = "0px"; |
54 (double or sequence<double>) threshold = 0.0; | 53 (double or sequence<double>) threshold = 0.0; |
55 }; | 54 }; |
LEFT | RIGHT |