* Send message to runtime to start sending intersection messages. * @param {function(Array )} callback Function to call every time we * receive an intersection message. * @return {function()} that when called stops triggering the callback * every time we receive an inters
(callback)
| 173 | * every time we receive an intersection message. |
| 174 | */ |
| 175 | observeIntersection(callback) { |
| 176 | return this.client_.makeRequest( |
| 177 | MessageType_Enum.SEND_INTERSECTIONS, |
| 178 | MessageType_Enum.INTERSECTION, |
| 179 | (intersection) => { |
| 180 | callback(intersection['changes']); |
| 181 | } |
| 182 | ); |
| 183 | } |
| 184 | |
| 185 | /** |
| 186 | * Requests HTML snippet from the parent window. |
no test coverage detected