// RemoveAttribute - Removes attribute with given name from an element with given id.
// nodeId - Id of the element to remove attribute from.
// name - Name of the attribute to remove.
334155
func (c *DOM) RemoveAttribute(nodeId int, name string) (*gcdmessage.ChromeResponse, error) {
	var v DOMRemoveAttributeParams
	v.NodeId = nodeId
	v.Name = name
	return c.RemoveAttributeWithParams(&v)
}
713222
func (t *Table) AddAttribute(attr Attribute) error {
	t.attributes = append(t.attributes, attr)
	return nil
}
687045
func findAttribute(n *html.Node, key string) string {
	if a := n.Attr; a != nil {
		for i := range a {
			if a[i].Key == key {
				return a[i].Val
			}
		}
	}
	return ""
}
402055
func (s *DeviceRegistryEnrichActivity) SetAttribute(v string) *DeviceRegistryEnrichActivity {
	s.Attribute = &v
	return s
}
210260
func (f *FloatConvertFilter) AddAttribute(a base.Attribute) error {
	f.attrs = append(f.attrs, a)
	return nil
}
913166
func (m *Mat64Instances) RemoveClassAttribute(a Attribute) error {
	as, err := m.GetAttribute(a)
	if err != nil {
		return err
	}

	m.classAttrs[as.position] = false
	return nil
}
1085772
func (s *FacetAttributeUpdate) SetAttribute(v *FacetAttribute) *FacetAttributeUpdate {
	s.Attribute = v
	return s
}
1257341
func (n Node) DOTAttributes() []dot.Attribute {
	color := n.Color
	if len(color) == 0 {
		color = "black"
	}

	return []dot.Attribute{
		{Key: "label", Value: fmt.Sprintf("%q", n)},
		{Key: "color", Value: color},
	}
}
708169
func (b *BigIP) DeleteNode(name string) error {
	return b.delete(uriLtm, uriNode, name)
}
843058
func (c *DOM) GetAttributes(nodeId int) ([]string, error) {
	var v DOMGetAttributesParams
	v.NodeId = nodeId
	return c.GetAttributesWithParams(&v)
}
515597
func (w *Window) GetAttribute(attrib Hint) int {
	return int(C.glfwGetWindowAttrib(w.data, C.int(attrib)))
}
1285781
func (self htmlIdImpl) TextAttribute() DomAttribute {
	return self.getOrCreateAttribute("text", func() DomAttribute {
		return NewTextAttr(self.t)
	})
}
621179
func (b *BinaryAttributeGroup) AddAttribute(a Attribute) error {
	b.attributes = append(b.attributes, a)
	return nil
}
799965
func (g *Graph) RemoveNode(remove *Node) {
	if remove.node == nil {
		return
	}
	// O(V)
	nodeExists := false
	// remove all edges that connect from a different node to this one
	for _, node := range g.nodes {
		if node == remove.node {
			nodeExists = true
			continue
		}

		// O(E)
		swapIndex := -1 // index that the edge-to-remove is at
		for i := range node.edges {
			if node.edges[i].end == remove.node {
				swapIndex = i
			}
		}
		if swapIndex > -1 {
			swapNRemoveEdge(swapIndex, &node.edges)
		}

		// deal with possible reversed edge
		swapIndex = -1
		for i := range node.reversedEdges {
			if node.reversedEdges[i].end == remove.node {
				swapIndex = i
			}
		}
		if swapIndex > -1 {
			swapNRemoveEdge(swapIndex, &node.reversedEdges)
		}
		if node.index > remove.node.index {
			node.index--
		}
	}
	if nodeExists {
		copy(g.nodes[remove.node.index:], g.nodes[remove.node.index+1:])
		g.nodes = g.nodes[:len(g.nodes)-1]
	}
	remove.node.parent = nil
	remove.node = nil
}
285298
func (nt *NodeTree) RemoveNode(n *v1.Node) error {
	nt.mu.Lock()
	defer nt.mu.Unlock()
	return nt.removeNode(n)
}
23813
func (e *Element) GetAttribute(name string) string {
	attr, err := e.GetAttributes()
	if err != nil {
		return ""
	}
	return attr[name]
}
839248
func (c *Device) getAttribute(attr string) (string, error) {
	resp, err := roundTripSingleResponse(c.server,
		fmt.Sprintf("%s:%s", c.descriptor.getHostPrefix(), attr))
	if err != nil {
		return "", err
	}
	return string(resp), nil
}