MCPcopy
hub / github.com/fanmingming/live / getAndRemoveAttr

Function getAndRemoveAttr

m3u8/vue.js:7095–7114  ·  view source on GitHub ↗
(
    el,
    name,
    removeFromMap
  )

Source from the content-addressed store, hash-verified

7093 // By default it does NOT remove it from the map (attrsMap) because the map is
7094 // needed during codegen.
7095 function getAndRemoveAttr (
7096 el,
7097 name,
7098 removeFromMap
7099 ) {
7100 var val;
7101 if ((val = el.attrsMap[name]) != null) {
7102 var list = el.attrsList;
7103 for (var i = 0, l = list.length; i < l; i++) {
7104 if (list[i].name === name) {
7105 list.splice(i, 1);
7106 break
7107 }
7108 }
7109 }
7110 if (removeFromMap) {
7111 delete el.attrsMap[name];
7112 }
7113 return val
7114 }
7115
7116 function getAndRemoveAttrByRegex (
7117 el,

Callers 10

getBindingAttrFunction · 0.85
transformNodeFunction · 0.85
transformNode$1Function · 0.85
processPreFunction · 0.85
processForFunction · 0.85
processIfFunction · 0.85
processOnceFunction · 0.85
processSlotContentFunction · 0.85
processComponentFunction · 0.85
preTransformNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected