本文整理汇总了C++中TextTrackCue::hasEventListeners方法的典型用法代码示例。如果您正苦于以下问题:C++ TextTrackCue::hasEventListeners方法的具体用法?C++ TextTrackCue::hasEventListeners怎么用?C++ TextTrackCue::hasEventListeners使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextTrackCue
的用法示例。
在下文中一共展示了TextTrackCue::hasEventListeners方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: isReachableFromOpaqueRoots
bool JSTextTrackCueOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
JSTextTrackCue* jsTextTrackCue = jsCast<JSTextTrackCue*>(handle.get().asCell());
TextTrackCue* textTrackCue = static_cast<TextTrackCue*>(jsTextTrackCue->impl());
// If the cue is firing event listeners, its wrapper is reachable because
// the wrapper is responsible for marking those event listeners.
if (textTrackCue->isFiringEventListeners())
return true;
// If the cue has no event listeners and has no custom properties, it is not reachable.
if (!textTrackCue->hasEventListeners() && !jsTextTrackCue->hasCustomProperties())
return false;
// If the cue is not associated with a track, it is not reachable.
if (!textTrackCue->track())
return false;
return visitor.containsOpaqueRoot(root(textTrackCue->track()));
}