MCPcopy Index your code
hub / github.com/Macuyiko/minecraft-python / _addNamedNode

Function _addNamedNode

ServerEditorWeb/ace/worker-xml.js:1955–1969  ·  view source on GitHub ↗
(el,list,newAttr,oldAttr)

Source from the content-addressed store, hash-verified

1953}
1954
1955function _addNamedNode(el,list,newAttr,oldAttr){
1956 if(oldAttr){
1957 list[_findNodeIndex(list,oldAttr)] = newAttr;
1958 }else{
1959 list[list.length++] = newAttr;
1960 }
1961 if(el){
1962 newAttr.ownerElement = el;
1963 var doc = el.ownerDocument;
1964 if(doc){
1965 oldAttr && _onRemoveAttribute(doc,el,oldAttr);
1966 _onAddAttribute(doc,el,newAttr);
1967 }
1968 }
1969}
1970function _removeNamedNode(el,list,attr){
1971 var i = _findNodeIndex(list,attr);
1972 if(i>=0){

Callers 1

worker-xml.jsFile · 0.85

Calls 3

_findNodeIndexFunction · 0.85
_onRemoveAttributeFunction · 0.85
_onAddAttributeFunction · 0.85

Tested by

no test coverage detected