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

Function transformNode

m3u8/vue.js:9116–9138  ·  view source on GitHub ↗
(el, options)

Source from the content-addressed store, hash-verified

9114 /* */
9115
9116 function transformNode (el, options) {
9117 var warn = options.warn || baseWarn;
9118 var staticClass = getAndRemoveAttr(el, 'class');
9119 if (staticClass) {
9120 var res = parseText(staticClass, options.delimiters);
9121 if (res) {
9122 warn(
9123 "class=\"" + staticClass + "\": " +
9124 'Interpolation inside attributes has been removed. ' +
9125 'Use v-bind or the colon shorthand instead. For example, ' +
9126 'instead of <div class="{{ val }}">, use <div :class="val">.',
9127 el.rawAttrsMap['class']
9128 );
9129 }
9130 }
9131 if (staticClass) {
9132 el.staticClass = JSON.stringify(staticClass);
9133 }
9134 var classBinding = getBindingAttr(el, 'class', false /* getStatic */);
9135 if (classBinding) {
9136 el.classBinding = classBinding;
9137 }
9138 }
9139
9140 function genData (el) {
9141 var data = '';

Callers

nothing calls this directly

Calls 4

getAndRemoveAttrFunction · 0.85
parseTextFunction · 0.85
warnFunction · 0.85
getBindingAttrFunction · 0.85

Tested by

no test coverage detected