(el,list,newAttr,oldAttr)
| 1953 | } |
| 1954 | |
| 1955 | function _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 | } |
| 1970 | function _removeNamedNode(el,list,attr){ |
| 1971 | var i = _findNodeIndex(list,attr); |
| 1972 | if(i>=0){ |
no test coverage detected