ensureEventResponderBound method
void
ensureEventResponderBound()
inherited
Implementation
void ensureEventResponderBound() {
// Must bind event responder on render box model whatever there is no event listener.
RenderBoxModel? renderBox = renderBoxModel;
if (renderBox != null) {
// Make sure pointer responder bind.
renderBox.getEventTarget = getEventTarget;
if (_hasIntersectionObserverEvent()) {
renderBox.addIntersectionChangeListener(handleIntersectionChange);
// Mark the compositing state for this render object as dirty
// cause it will create new layer.
renderBox.markNeedsCompositingBitsUpdate();
} else {
// Remove listener when no intersection related event
renderBox.removeIntersectionChangeListener(handleIntersectionChange);
}
}
}