MCPcopy
hub / github.com/msoedov/agentic_security / _createElement

Function _createElement

agentic_security/static/vue.js:3363–3451  ·  view source on GitHub ↗
(
    context,
    tag,
    data,
    children,
    normalizationType
  )

Source from the content-addressed store, hash-verified

3361 }
3362
3363 function _createElement (
3364 context,
3365 tag,
3366 data,
3367 children,
3368 normalizationType
3369 ) {
3370 if (isDef(data) && isDef((data).__ob__)) {
3371 warn(
3372 "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
3373 'Always create fresh vnode data objects in each render!',
3374 context
3375 );
3376 return createEmptyVNode()
3377 }
3378 // object syntax in v-bind
3379 if (isDef(data) && isDef(data.is)) {
3380 tag = data.is;
3381 }
3382 if (!tag) {
3383 // in case of component :is set to falsy value
3384 return createEmptyVNode()
3385 }
3386 // warn against non-primitive key
3387 if (isDef(data) && isDef(data.key) && !isPrimitive(data.key)
3388 ) {
3389 {
3390 warn(
3391 'Avoid using non-primitive value as key, ' +
3392 'use string/number value instead.',
3393 context
3394 );
3395 }
3396 }
3397 // support single function children as default scoped slot
3398 if (Array.isArray(children) &&
3399 typeof children[0] === 'function'
3400 ) {
3401 data = data || {};
3402 data.scopedSlots = { default: children[0] };
3403 children.length = 0;
3404 }
3405 if (normalizationType === ALWAYS_NORMALIZE) {
3406 children = normalizeChildren(children);
3407 } else if (normalizationType === SIMPLE_NORMALIZE) {
3408 children = simpleNormalizeChildren(children);
3409 }
3410 var vnode, ns;
3411 if (typeof tag === 'string') {
3412 var Ctor;
3413 ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
3414 if (config.isReservedTag(tag)) {
3415 // platform built-in elements
3416 if (isDef(data) && isDef(data.nativeOn)) {
3417 warn(
3418 ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
3419 context
3420 );

Callers 1

createElementFunction · 0.85

Calls 10

isDefFunction · 0.85
warnFunction · 0.85
createEmptyVNodeFunction · 0.85
isPrimitiveFunction · 0.85
normalizeChildrenFunction · 0.85
simpleNormalizeChildrenFunction · 0.85
resolveAssetFunction · 0.85
createComponentFunction · 0.85
applyNSFunction · 0.85
registerDeepBindingsFunction · 0.85

Tested by

no test coverage detected