Layout:IntersectionObserver: Difference between revisions

Jump to navigation Jump to search
Describe lifetime in FF >= 58
(Fix typo)
(Describe lifetime in FF >= 58)
Line 25: Line 25:


''nsDomSlots::Unlink'' calls ''DOMIntersectionObserver::UnlinkTarget'' for every observer in  
''nsDomSlots::Unlink'' calls ''DOMIntersectionObserver::UnlinkTarget'' for every observer in  
''nsSlots::mRegisteredIntersectionObservers''.
<big><big>'''Lifetime (as in FF >= 58)'''</big></big>
''DOMIntersectionObserver::observe(Element& aTarget)'' adds ''aTarget'' to ''DOMIntersectionObserver::mObservationTargets'' and calls ''Element::RegisterIntersectionObsever'' on ''aTarget''. If ''aTarget'' is the first item in ''DOMIntersectionObserver::mObservationTargets'', ''nsDocument::AddIntersectionObserver'' is called and the observer gets added to ''nsDocument::mIntersectionObservers''.
''Element::RegisterIntersectionObserver(DOMIntersectionObserver* aObserver)'' adds ''aObserver'' to ''Property(nsGkAtoms::intersectionobserverlist)''.
<big>'''Unlinking steps:'''</big>
''DOMIntersectionObserver::unobserve(Element& aTarget)'' removes aTarget from ''DOMIntersectionObserver::mObservationTargets'' and calls ''Element::UnregisterIntersectionObsever'' on ''aTarget''. If aTarget is the last item in ''DOMIntersectionObserver::mObservationTargets'', ''nsDocument::RemoveIntersectionObserver'' is called and the observer gets removed from ''nsDocument::mIntersectionObservers''.
''DOMIntersectionObserver::Disconnect()'' calls ''Element::UnregisterIntersectionObsever'' for every item in ''DOMIntersectionObserver::mObservationTargets''.
''Element::UnregisterIntersectionObserver(DOMIntersectionObserver* aObserver)'' removes ''aObserver'' from ''Property(nsGkAtoms::intersectionobserverlist)''.
''DOMIntersectionObserver::~DOMIntersectionObserver'' calls ''DOMIntersectionObserver::Disconnect()''.
''DOMIntersectionObserver::Unlink'' calls ''DOMIntersectionObserver::Disconnect()''.
''nsNodeUtils::LastRelease'' calls ''DOMIntersectionObserver::UnlinkElement'' for every observer in
''nsSlots::mRegisteredIntersectionObservers''.
''nsDomSlots::Unlink'' calls ''DOMIntersectionObserver::UnlinkElement'' for every observer in
''nsSlots::mRegisteredIntersectionObservers''.
''nsSlots::mRegisteredIntersectionObservers''.
31

edits

Navigation menu