selection_properties.go
func (s *Selection) Active() (bool, error) {
	selectedElement, err := s.elements.GetExactlyOne()
	if err != nil {
		return false, fmt.Errorf("failed to select element from %s: %s", s, err)
	}

	activeElement, err := s.session.GetActiveElement()
	if err != nil {
		return false, fmt.Errorf("failed to retrieve active element: %s", err)
	}

	equal, err := selectedElement.IsEqualTo(activeElement)
	if err != nil {
		return false, fmt.Errorf("failed to compare selection to active element: %s", err)
	}

	return equal, nil
}
func (s *Selection) Active() (bool, error) {
	selectedElement, err := s.elements.GetExactlyOne()
	if err != nil {
		return false, fmt.Errorf("failed to select element from %s: %s", s, err)
	}

	activeElement, err := s.session.GetActiveElement()
	if err != nil {
		return false, fmt.Errorf("failed to retrieve active element: %s", err)
	}

	equal, err := selectedElement.IsEqualTo(activeElement)
	if err != nil {
		return false, fmt.Errorf("failed to compare selection to active element: %s", err)
	}

	return equal, nil
}
// Active returns true if the single element that the selection refers to is active.