// IsFocused return true if one of the children is focused.
436463
func (b *Box) IsFocused() bool {
	for _, w := range b.children {
		if w.IsFocused() {
			return true
		}
	}
	return false
}
14449
func (t *TextView) HasFocus() bool {
	// Implemented here with locking because this may be used in the "changed"
	// callback.
	t.Lock()
	defer t.Unlock()
	return t.hasFocus
}
1276218
func (f *Form) HasFocus() bool {
	if f.hasFocus {
		return true
	}
	for _, item := range f.items {
		if item.GetFocusable().HasFocus() {
			return true
		}
	}
	for _, button := range f.buttons {
		if button.focus.HasFocus() {
			return true
		}
	}
	return false
}
193089
func (c *Emulation) SetFocusEmulationEnabled(enabled bool) (*gcdmessage.ChromeResponse, error) {
	var v EmulationSetFocusEmulationEnabledParams
	v.Enabled = enabled
	return c.SetFocusEmulationEnabledWithParams(&v)
}
890580
def is_focused(self):
        
        active_el = self.browser.execute_script("return document.activeElement")
        query_results = self.map(lambda el: el == active_el, 'focused').results

        if query_results:
            return any(query_results)
        return False
515259
function isPotentiallyFocusable(element) {
    // Inputs are potentially focusable *unless* they're type="hidden".
    if (isHiddenInput(element)) {
        return false;
    }
    return isNativeFormElement(element) ||
        isAnchorWithHref(element) ||
        element.hasAttribute('contenteditable') ||
        hasValidTabIndex(element);
}
462133
func (b *bmBlock) isMarked(i uintptr) bool {
	return (b[i/uintptrBits] & (1 << (i % uintptrBits))) != 0
}
442440
public function isFocused()
	{
		if( $this->focus !== FALSE && $this->focusKey )
			return 'primary';
		if( count( $this->foreignFocuses ) )
			return 'foreign';
		return FALSE;
	}
629076
func HasInteractive(ctx context.Context) bool {
	_, ok := ctx.Value(ctxKeyInteractive).(bool)
	return ok
}
1124442
func focusedSample(s *Sample, focus, ignore TagMatch) (fm, im bool) {
	fm = focus == nil
	for key, vals := range s.Label {
		for _, val := range vals {
			if ignore != nil && ignore(key, val, 0) {
				im = true
			}
			if !fm && focus(key, val, 0) {
				fm = true
			}
		}
	}
	for key, vals := range s.NumLabel {
		for _, val := range vals {
			if ignore != nil && ignore(key, "", val) {
				im = true
			}
			if !fm && focus(key, "", val) {
				fm = true
			}
		}
	}
	return fm, im
}
1373184
func (writer *ConsoleWriter) TimeRotated() bool {
	writer.lock.RLock()
	defer writer.lock.RUnlock()

	return false
}
235375
func (l *List) SetSelectedFocusOnly(focusOnly bool) *List {
	l.selectedFocusOnly = focusOnly
	return l
}
812416
func (tc *typCache) isPointer(typ reflect.Type) bool {
	return tc.info(typ).isPointer
}
395462
func (t *Track) IsStarred() bool {
	starred := C.sp_track_is_starred(
		t.session.sp_session,
		t.sp_track,
	)
	return starred == 1
}
1063039
func Seeked(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "seeked", Listener: listener}
}
937042
func (s *PutBotInput) SetChildDirected(v bool) *PutBotInput {
	s.ChildDirected = &v
	return s
}
916734
func IsInteractive(ctx context.Context) bool {
	bv, ok := ctx.Value(ctxKeyInteractive).(bool)
	if !ok {
		return true
	}
	return bv
}