code stringlengths 24 2.07M | docstring stringlengths 25 85.3k | func_name stringlengths 1 92 | language stringclasses 1
value | repo stringlengths 5 64 | path stringlengths 4 172 | url stringlengths 44 218 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
function renderList (
val,
render
) {
let ret, i, l, keys, key;
if (Array.isArray(val) || typeof val === 'string') {
ret = new Array(val.length);
for (i = 0, l = val.length; i < l; i++) {
ret[i] = render(val[i], i);
}
} else if (typeof val === 'number') {
ret = new Array(val);
for (i... | Runtime helper for rendering v-for lists. | renderList | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function checkKeyCodes (
eventKeyCode,
key,
builtInAlias,
eventKeyName
) {
const keyCodes = config.keyCodes[key] || builtInAlias;
if (keyCodes) {
if (Array.isArray(keyCodes)) {
return keyCodes.indexOf(eventKeyCode) === -1
} else {
return keyCodes !== eventKeyCode
}
} else if (event... | Runtime helper for checking keyCodes from config.
exposed as Vue.prototype._k
passing in eventKeyName as last argument separately for backwards compat | checkKeyCodes | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function bindObjectProps (
data,
tag,
value,
asProp,
isSync
) {
if (value) {
if (!isObject(value)) {
"development" !== 'production' && warn(
'v-bind without argument expects an Object or Array value',
this
);
} else {
if (Array.isArray(value)) {
value = toOb... | Runtime helper for merging v-bind="object" into a VNode's data. | bindObjectProps | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function renderStatic (
index,
isInFor,
isOnce
) {
// render fns generated by compiler < 2.5.4 does not provide v-once
// information to runtime so be conservative
const isOldVersion = arguments.length < 3;
// if a static tree is generated by v-once, it is cached on the instance;
// otherwise it is pure... | Runtime helper for rendering static trees. | renderStatic | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function markOnce (
tree,
index,
key
) {
markStatic(tree, `__once__${index}${key ? `_${key}` : ``}`, true);
return tree
} | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | markOnce | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function markStatic (
tree,
key,
isOnce
) {
if (Array.isArray(tree)) {
for (let i = 0; i < tree.length; i++) {
if (tree[i] && typeof tree[i] !== 'string') {
markStaticNode(tree[i], `${key}_${i}`, isOnce);
}
}
} else {
markStaticNode(tree, key, isOnce);
}
} | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | markStatic | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function markStaticNode (node, key, isOnce) {
node.isStatic = true;
node.key = key;
node.isOnce = isOnce;
} | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | markStaticNode | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function bindObjectListeners (data, value) {
if (value) {
if (!isPlainObject(value)) {
"development" !== 'production' && warn(
'v-on without argument expects an Object value',
this
);
} else {
const on = data.on = data.on ? extend({}, data.on) : {};
for (const key in va... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | bindObjectListeners | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function installRenderHelpers (target) {
target._o = markOnce;
target._n = toNumber;
target._s = toString;
target._l = renderList;
target._t = renderSlot;
target._q = looseEqual;
target._i = looseIndexOf;
target._m = renderStatic;
target._f = resolveFilter;
target._k = checkKeyCodes;
target._b = b... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | installRenderHelpers | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function FunctionalRenderContext (
data,
props,
children,
parent,
Ctor
) {
const options = Ctor.options;
this.data = data;
this.props = props;
this.children = children;
this.parent = parent;
this.listeners = data.on || emptyObject;
this.injections = resolveInject(options.inject, parent);
this.... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | FunctionalRenderContext | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function createFunctionalComponent (
Ctor,
propsData,
data,
contextVm,
children
) {
const options = Ctor.options;
const props = {};
const propOptions = options.props;
if (isDef(propOptions)) {
for (const key in propOptions) {
props[key] = validateProp(key, propOptions, propsData || emptyObje... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | createFunctionalComponent | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function mergeProps (to, from) {
for (const key in from) {
to[camelize(key)] = from[key];
}
} | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | mergeProps | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
init (
vnode,
hydrating,
parentElm,
refElm
) {
if (!vnode.componentInstance || vnode.componentInstance._isDestroyed) {
const child = vnode.componentInstance = createComponentInstanceForVnode(
vnode,
activeInstance,
parentElm,
refElm
);
child.$mount... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | init | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
prepatch (oldVnode, vnode) {
const options = vnode.componentOptions;
const child = vnode.componentInstance = oldVnode.componentInstance;
updateChildComponent(
child,
options.propsData, // updated props
options.listeners, // updated listeners
vnode, // new parent vnode
options.c... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | prepatch | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
insert (vnode) {
const { context, componentInstance } = vnode;
if (!componentInstance._isMounted) {
componentInstance._isMounted = true;
callHook(componentInstance, 'mounted');
}
if (vnode.data.keepAlive) {
if (context._isMounted) {
// vue-router#1212
// During updates,... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | insert | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
destroy (vnode) {
const { componentInstance } = vnode;
if (!componentInstance._isDestroyed) {
if (!vnode.data.keepAlive) {
componentInstance.$destroy();
} else {
deactivateChildComponent(componentInstance, true /* direct */);
}
}
} | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | destroy | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function createComponent (
Ctor,
data,
context,
children,
tag
) {
if (isUndef(Ctor)) {
return
}
const baseCtor = context.$options._base;
// plain options object: turn it into a constructor
if (isObject(Ctor)) {
Ctor = baseCtor.extend(Ctor);
}
// if at this stage it's not a constructor... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | createComponent | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function createComponentInstanceForVnode (
vnode, // we know it's MountedComponentVNode but flow doesn't
parent, // activeInstance in lifecycle state
parentElm,
refElm
) {
const vnodeComponentOptions = vnode.componentOptions;
const options = {
_isComponent: true,
parent,
propsData: vnodeComponen... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | createComponentInstanceForVnode | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function mergeHooks (data) {
if (!data.hook) {
data.hook = {};
}
for (let i = 0; i < hooksToMerge.length; i++) {
const key = hooksToMerge[i];
const fromParent = data.hook[key];
const ours = componentVNodeHooks[key];
data.hook[key] = fromParent ? mergeHook$1(ours, fromParent) : ours;
}
} | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | mergeHooks | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function mergeHook$1 (one, two) {
return function (a, b, c, d) {
one(a, b, c, d);
two(a, b, c, d);
}
} | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | mergeHook$1 | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function transformModel (options, data) {
const prop = (options.model && options.model.prop) || 'value';
const event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;
const on = data.on || (data.on = {});
if (isDef(on[event])) {
on[event] = [data... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | transformModel | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function createElement (
context,
tag,
data,
children,
normalizationType,
alwaysNormalize
) {
if (Array.isArray(data) || isPrimitive(data)) {
normalizationType = children;
children = data;
data = undefined;
}
if (isTrue(alwaysNormalize)) {
normalizationType = ALWAYS_NORMALIZE;
}
re... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | createElement | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function _createElement (
context,
tag,
data,
children,
normalizationType
) {
if (isDef(data) && isDef((data).__ob__)) {
"development" !== 'production' && warn(
`Avoid using observed data object as vnode data: ${JSON.stringify(data)}\n` +
'Always create fresh vnode data objects in each rende... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | _createElement | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function applyNS (vnode, ns, force) {
vnode.ns = ns;
if (vnode.tag === 'foreignObject') {
// use default namespace inside foreignObject
ns = undefined;
force = true;
}
if (isDef(vnode.children)) {
for (let i = 0, l = vnode.children.length; i < l; i++) {
const child = vnode.children[i];
... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | applyNS | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function initRender (vm) {
vm._vnode = null; // the root of the child tree
vm._staticTrees = null; // v-once cached trees
const options = vm.$options;
const parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
const renderContext = parentVnode && parentVnode.context;
vm.$sl... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | initRender | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function renderMixin (Vue) {
// install runtime convenience helpers
installRenderHelpers(Vue.prototype);
Vue.prototype.$nextTick = function (fn) {
return nextTick(fn, this)
};
Vue.prototype._render = function () {
const vm = this;
const { render, _parentVnode } = vm.$options;
if (vm._isMoun... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | renderMixin | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function initMixin (Vue) {
Vue.prototype._init = function (options) {
const vm = this;
// a uid
vm._uid = uid$1++;
let startTag, endTag;
/* istanbul ignore if */
if ("development" !== 'production' && config.performance && mark) {
startTag = `vue-perf-start:${vm._uid}`;
endTag = `v... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | initMixin | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function initInternalComponent (vm, options) {
const opts = vm.$options = Object.create(vm.constructor.options);
// doing this because it's faster than dynamic enumeration.
opts.parent = options.parent;
opts.propsData = options.propsData;
opts._parentVnode = options._parentVnode;
opts._parentListeners = opt... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | initInternalComponent | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function resolveConstructorOptions (Ctor) {
let options = Ctor.options;
if (Ctor.super) {
const superOptions = resolveConstructorOptions(Ctor.super);
const cachedSuperOptions = Ctor.superOptions;
if (superOptions !== cachedSuperOptions) {
// super option changed,
// need to resolve new optio... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | resolveConstructorOptions | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function resolveModifiedOptions (Ctor) {
let modified;
const latest = Ctor.options;
const extended = Ctor.extendOptions;
const sealed = Ctor.sealedOptions;
for (const key in latest) {
if (latest[key] !== sealed[key]) {
if (!modified) modified = {};
modified[key] = dedupe(latest[key], extended[... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | resolveModifiedOptions | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function dedupe (latest, extended, sealed) {
// compare latest and sealed to ensure lifecycle hooks won't be duplicated
// between merges
if (Array.isArray(latest)) {
const res = [];
sealed = Array.isArray(sealed) ? sealed : [sealed];
extended = Array.isArray(extended) ? extended : [extended];
for... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | dedupe | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function Vue$3 (options) {
if ("development" !== 'production' &&
!(this instanceof Vue$3)
) {
warn('Vue is a constructor and should be called with the `new` keyword');
}
this._init(options);
} | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | Vue$3 | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function initUse (Vue) {
Vue.use = function (plugin) {
const installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
if (installedPlugins.indexOf(plugin) > -1) {
return this
}
// additional parameters
const args = toArray(arguments, 1);
args.unshift(this);
if (... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | initUse | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function initMixin$1 (Vue) {
Vue.mixin = function (mixin) {
this.options = mergeOptions(this.options, mixin);
return this
};
} | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | initMixin$1 | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function initExtend (Vue) {
/**
* Each instance constructor, including Vue, has a unique
* cid. This enables us to create wrapped "child
* constructors" for prototypal inheritance and cache them.
*/
Vue.cid = 0;
let cid = 1;
/**
* Class inheritance
*/
Vue.extend = function (extendOptions) {... | Runtime helper for v-once.
Effectively it means marking the node as static with a unique key. | initExtend | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function query (el) {
if (typeof el === 'string') {
const selected = document.querySelector(el);
if (!selected) {
"development" !== 'production' && warn(
'Cannot find element: ' + el
);
return document.createElement('div')
}
return selected
} else {
return el
}
} | Query an element selector if it's not an element already. | query | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function createElement$1 (tagName, vnode) {
const elm = document.createElement(tagName);
if (tagName !== 'select') {
return elm
}
// false or null will remove the attribute but undefined will not
if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {
elm.setAttribute('multipl... | Query an element selector if it's not an element already. | createElement$1 | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function createElementNS (namespace, tagName) {
return document.createElementNS(namespaceMap[namespace], tagName)
} | Query an element selector if it's not an element already. | createElementNS | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function createTextNode (text) {
return document.createTextNode(text)
} | Query an element selector if it's not an element already. | createTextNode | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function createComment (text) {
return document.createComment(text)
} | Query an element selector if it's not an element already. | createComment | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function insertBefore (parentNode, newNode, referenceNode) {
parentNode.insertBefore(newNode, referenceNode);
} | Query an element selector if it's not an element already. | insertBefore | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function parentNode (node) {
return node.parentNode
} | Query an element selector if it's not an element already. | parentNode | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function nextSibling (node) {
return node.nextSibling
} | Query an element selector if it's not an element already. | nextSibling | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function tagName (node) {
return node.tagName
} | Query an element selector if it's not an element already. | tagName | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function setTextContent (node, text) {
node.textContent = text;
} | Query an element selector if it's not an element already. | setTextContent | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function setAttribute (node, key, val) {
node.setAttribute(key, val);
} | Query an element selector if it's not an element already. | setAttribute | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
update (oldVnode, vnode) {
if (oldVnode.data.ref !== vnode.data.ref) {
registerRef(oldVnode, true);
registerRef(vnode);
}
} | Query an element selector if it's not an element already. | update | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
destroy (vnode) {
registerRef(vnode, true);
} | Query an element selector if it's not an element already. | destroy | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function registerRef (vnode, isRemoval) {
const key = vnode.data.ref;
if (!key) return
const vm = vnode.context;
const ref = vnode.componentInstance || vnode.elm;
const refs = vm.$refs;
if (isRemoval) {
if (Array.isArray(refs[key])) {
remove(refs[key], ref);
} else if (refs[key] === ref) {
... | Query an element selector if it's not an element already. | registerRef | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function genComponentModel (
el,
value,
modifiers
) {
const { number, trim } = modifiers || {};
const baseValueExpression = '$$v';
let valueExpression = baseValueExpression;
if (trim) {
valueExpression =
`(typeof ${baseValueExpression} === 'string'` +
`? ${baseValueExpression}.trim()` +... | Cross-platform code generation for component v-model | genComponentModel | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function genAssignmentCode (
value,
assignment
) {
const res = parseModel(value);
if (res.key === null) {
return `${value}=${assignment}`
} else {
return `$set(${res.exp}, ${res.key}, ${assignment})`
}
} | Cross-platform codegen helper for generating v-model value assignment code. | genAssignmentCode | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function parseModel (val) {
len = val.length;
if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {
index$1 = val.lastIndexOf('.');
if (index$1 > -1) {
return {
exp: val.slice(0, index$1),
key: '"' + val.slice(index$1 + 1) + '"'
}
} else {
return {
exp:... | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | parseModel | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function next () {
return str.charCodeAt(++index$1)
} | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | next | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function eof () {
return index$1 >= len
} | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | eof | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function isStringStart (chr) {
return chr === 0x22 || chr === 0x27
} | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | isStringStart | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function parseBracket (chr) {
let inBracket = 1;
expressionPos = index$1;
while (!eof()) {
chr = next();
if (isStringStart(chr)) {
parseString(chr);
continue
}
if (chr === 0x5B) inBracket++;
if (chr === 0x5D) inBracket--;
if (inBracket === 0) {
expressionEndPos = index$1;... | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | parseBracket | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function parseString (chr) {
const stringQuote = chr;
while (!eof()) {
chr = next();
if (chr === stringQuote) {
break
}
}
} | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | parseString | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function model (
el,
dir,
_warn
) {
warn$1 = _warn;
const value = dir.value;
const modifiers = dir.modifiers;
const tag = el.tag;
const type = el.attrsMap.type;
{
// inputs with type="file" are read only and setting the input's
// value will throw an error.
if (tag === 'input' && type ===... | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | model | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function genCheckboxModel (
el,
value,
modifiers
) {
const number = modifiers && modifiers.number;
const valueBinding = getBindingAttr(el, 'value') || 'null';
const trueValueBinding = getBindingAttr(el, 'true-value') || 'true';
const falseValueBinding = getBindingAttr(el, 'false-value') || 'false';
addP... | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | genCheckboxModel | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function genRadioModel (
el,
value,
modifiers
) {
const number = modifiers && modifiers.number;
let valueBinding = getBindingAttr(el, 'value') || 'null';
valueBinding = number ? `_n(${valueBinding})` : valueBinding;
addProp(el, 'checked', `_q(${value},${valueBinding})`);
addHandler(el, 'change', g... | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | genRadioModel | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function genSelect (
el,
value,
modifiers
) {
const number = modifiers && modifiers.number;
const selectedVal = `Array.prototype.filter` +
`.call($event.target.options,function(o){return o.selected})` +
`.map(function(o){var val = "_value" in o ? o._value : o.value;` +
`return ${number ? '_n... | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | genSelect | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function genDefaultModel (
el,
value,
modifiers
) {
const type = el.attrsMap.type;
// warn if v-bind:value conflicts with v-model
{
const value = el.attrsMap['v-bind:value'] || el.attrsMap[':value'];
if (value) {
const binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value';
w... | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | genDefaultModel | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function normalizeEvents (on) {
/* istanbul ignore if */
if (isDef(on[RANGE_TOKEN])) {
// IE input[type=range] only supports `change` event
const event = isIE ? 'change' : 'input';
on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);
delete on[RANGE_TOKEN];
}
// This was originally intended ... | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | normalizeEvents | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function createOnceHandler (handler, event, capture) {
const _target = target$1; // save current target element in closure
return function onceHandler () {
const res = handler.apply(null, arguments);
if (res !== null) {
remove$2(event, onceHandler, capture, _target);
}
}
} | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | createOnceHandler | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function add$1 (
event,
handler,
once$$1,
capture,
passive
) {
handler = withMacroTask(handler);
if (once$$1) handler = createOnceHandler(handler, event, capture);
target$1.addEventListener(
event,
handler,
supportsPassive
? { capture, passive }
: capture
);
} | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | add$1 | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function remove$2 (
event,
handler,
capture,
_target
) {
(_target || target$1).removeEventListener(
event,
handler._withTask || handler,
capture
);
} | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | remove$2 | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function updateDOMListeners (oldVnode, vnode) {
if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {
return
}
const on = vnode.data.on || {};
const oldOn = oldVnode.data.on || {};
target$1 = vnode.elm;
normalizeEvents(on);
updateListeners(on, oldOn, add$1, remove$2, vnode.context);
target$1 = ... | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | updateDOMListeners | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function updateDOMProps (oldVnode, vnode) {
if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {
return
}
let key, cur;
const elm = vnode.elm;
const oldProps = oldVnode.data.domProps || {};
let props = vnode.data.domProps || {};
// clone observed objects, as the user probably wants t... | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | updateDOMProps | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function shouldUpdateValue (elm, checkVal) {
return (!elm.composing && (
elm.tagName === 'OPTION' ||
isDirty(elm, checkVal) ||
isInputChanged(elm, checkVal)
))
} | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | shouldUpdateValue | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function isDirty (elm, checkVal) {
// return true when textbox (.number and .trim) loses focus and its value is
// not equal to the updated value
let notInFocus = true;
// #6157
// work around IE bug when accessing document.activeElement in an iframe
try { notInFocus = document.activeElement !== elm; } catc... | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | isDirty | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function isInputChanged (elm, newVal) {
const value = elm.value;
const modifiers = elm._vModifiers; // injected by v-model runtime
if (isDef(modifiers) && modifiers.number) {
return toNumber(value) !== toNumber(newVal)
}
if (isDef(modifiers) && modifiers.trim) {
return value.trim() !== newVal.trim()
... | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | isInputChanged | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function normalizeStyleData (data) {
const style = normalizeStyleBinding(data.style);
// static style is pre-processed into an object during compilation
// and is always a fresh object, so it's safe to merge into it
return data.staticStyle
? extend(data.staticStyle, style)
: style
} | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | normalizeStyleData | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function normalizeStyleBinding (bindingStyle) {
if (Array.isArray(bindingStyle)) {
return toObject(bindingStyle)
}
if (typeof bindingStyle === 'string') {
return parseStyleText(bindingStyle)
}
return bindingStyle
} | Parse a v-model expression into a base path and a final key segment.
Handles both dot-path and possible square brackets.
Possible cases:
- test
- test[key]
- test[test1[key]]
- test["a"][key]
- xxx.test[a[a].test1[key]]
- test.xxx.a["asa"][test1[key]] | normalizeStyleBinding | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function getStyle (vnode, checkChild) {
const res = {};
let styleData;
if (checkChild) {
let childNode = vnode;
while (childNode.componentInstance) {
childNode = childNode.componentInstance._vnode;
if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {
extend(res, s... | parent component style should be after child's
so that parent component's style could override it | getStyle | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
setProp = (el, name, val) => {
/* istanbul ignore if */
if (cssVarRE.test(name)) {
el.style.setProperty(name, val);
} else if (importantRE.test(val)) {
el.style.setProperty(name, val.replace(importantRE, ''), 'important');
} else {
const normalizedName = normalize(name);
if (Array.isArray(val)) ... | parent component style should be after child's
so that parent component's style could override it | setProp | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
setProp = (el, name, val) => {
/* istanbul ignore if */
if (cssVarRE.test(name)) {
el.style.setProperty(name, val);
} else if (importantRE.test(val)) {
el.style.setProperty(name, val.replace(importantRE, ''), 'important');
} else {
const normalizedName = normalize(name);
if (Array.isArray(val)) ... | parent component style should be after child's
so that parent component's style could override it | setProp | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function updateStyle (oldVnode, vnode) {
const data = vnode.data;
const oldData = oldVnode.data;
if (isUndef(data.staticStyle) && isUndef(data.style) &&
isUndef(oldData.staticStyle) && isUndef(oldData.style)
) {
return
}
let cur, name;
const el = vnode.elm;
const oldStaticStyle = oldData.stati... | parent component style should be after child's
so that parent component's style could override it | updateStyle | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function addClass (el, cls) {
/* istanbul ignore if */
if (!cls || !(cls = cls.trim())) {
return
}
/* istanbul ignore else */
if (el.classList) {
if (cls.indexOf(' ') > -1) {
cls.split(/\s+/).forEach(c => el.classList.add(c));
} else {
el.classList.add(cls);
}
} else {
const... | Add class with compatibility for SVG since classList is not supported on
SVG elements in IE | addClass | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function removeClass (el, cls) {
/* istanbul ignore if */
if (!cls || !(cls = cls.trim())) {
return
}
/* istanbul ignore else */
if (el.classList) {
if (cls.indexOf(' ') > -1) {
cls.split(/\s+/).forEach(c => el.classList.remove(c));
} else {
el.classList.remove(cls);
}
if (!el... | Remove class with compatibility for SVG since classList is not supported on
SVG elements in IE | removeClass | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function resolveTransition (def) {
if (!def) {
return
}
/* istanbul ignore else */
if (typeof def === 'object') {
const res = {};
if (def.css !== false) {
extend(res, autoCssTransition(def.name || 'v'));
}
extend(res, def);
return res
} else if (typeof def === 'string') {
ret... | Remove class with compatibility for SVG since classList is not supported on
SVG elements in IE | resolveTransition | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function nextFrame (fn) {
raf(() => {
raf(fn);
});
} | Remove class with compatibility for SVG since classList is not supported on
SVG elements in IE | nextFrame | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function addTransitionClass (el, cls) {
const transitionClasses = el._transitionClasses || (el._transitionClasses = []);
if (transitionClasses.indexOf(cls) < 0) {
transitionClasses.push(cls);
addClass(el, cls);
}
} | Remove class with compatibility for SVG since classList is not supported on
SVG elements in IE | addTransitionClass | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function removeTransitionClass (el, cls) {
if (el._transitionClasses) {
remove(el._transitionClasses, cls);
}
removeClass(el, cls);
} | Remove class with compatibility for SVG since classList is not supported on
SVG elements in IE | removeTransitionClass | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function whenTransitionEnds (
el,
expectedType,
cb
) {
const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
if (!type) return cb()
const event = type === TRANSITION ? transitionEndEvent : animationEndEvent;
let ended = 0;
const end = () => {
el.removeEventListener(event, onEnd);... | Remove class with compatibility for SVG since classList is not supported on
SVG elements in IE | whenTransitionEnds | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
end = () => {
el.removeEventListener(event, onEnd);
cb();
} | Remove class with compatibility for SVG since classList is not supported on
SVG elements in IE | end | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
end = () => {
el.removeEventListener(event, onEnd);
cb();
} | Remove class with compatibility for SVG since classList is not supported on
SVG elements in IE | end | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
onEnd = e => {
if (e.target === el) {
if (++ended >= propCount) {
end();
}
}
} | Remove class with compatibility for SVG since classList is not supported on
SVG elements in IE | onEnd | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
onEnd = e => {
if (e.target === el) {
if (++ended >= propCount) {
end();
}
}
} | Remove class with compatibility for SVG since classList is not supported on
SVG elements in IE | onEnd | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function getTransitionInfo (el, expectedType) {
const styles = window.getComputedStyle(el);
const transitionDelays = styles[transitionProp + 'Delay'].split(', ');
const transitionDurations = styles[transitionProp + 'Duration'].split(', ');
const transitionTimeout = getTimeout(transitionDelays, transitionDuratio... | Remove class with compatibility for SVG since classList is not supported on
SVG elements in IE | getTransitionInfo | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function getTimeout (delays, durations) {
/* istanbul ignore next */
while (delays.length < durations.length) {
delays = delays.concat(delays);
}
return Math.max.apply(null, durations.map((d, i) => {
return toMs(d) + toMs(delays[i])
}))
} | Remove class with compatibility for SVG since classList is not supported on
SVG elements in IE | getTimeout | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function toMs (s) {
return Number(s.slice(0, -1)) * 1000
} | Remove class with compatibility for SVG since classList is not supported on
SVG elements in IE | toMs | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function enter (vnode, toggleDisplay) {
const el = vnode.elm;
// call leave callback now
if (isDef(el._leaveCb)) {
el._leaveCb.cancelled = true;
el._leaveCb();
}
const data = resolveTransition(vnode.data.transition);
if (isUndef(data)) {
return
}
/* istanbul ignore if */
if (isDef(el._e... | Remove class with compatibility for SVG since classList is not supported on
SVG elements in IE | enter | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function leave (vnode, rm) {
const el = vnode.elm;
// call enter callback now
if (isDef(el._enterCb)) {
el._enterCb.cancelled = true;
el._enterCb();
}
const data = resolveTransition(vnode.data.transition);
if (isUndef(data) || el.nodeType !== 1) {
return rm()
}
/* istanbul ignore if */
... | Remove class with compatibility for SVG since classList is not supported on
SVG elements in IE | leave | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function performLeave () {
// the delayed leave may have already been cancelled
if (cb.cancelled) {
return
}
// record leaving element
if (!vnode.data.show) {
(el.parentNode._pending || (el.parentNode._pending = {}))[(vnode.key)] = vnode;
}
beforeLeave && beforeLeave(el);
if ... | Remove class with compatibility for SVG since classList is not supported on
SVG elements in IE | performLeave | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function checkDuration (val, name, vnode) {
if (typeof val !== 'number') {
warn(
`<transition> explicit ${name} duration is not a valid number - ` +
`got ${JSON.stringify(val)}.`,
vnode.context
);
} else if (isNaN(val)) {
warn(
`<transition> explicit ${name} duration is NaN - ` +... | Remove class with compatibility for SVG since classList is not supported on
SVG elements in IE | checkDuration | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function isValidDuration (val) {
return typeof val === 'number' && !isNaN(val)
} | Remove class with compatibility for SVG since classList is not supported on
SVG elements in IE | isValidDuration | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function getHookArgumentsLength (fn) {
if (isUndef(fn)) {
return false
}
const invokerFns = fn.fns;
if (isDef(invokerFns)) {
// invoker
return getHookArgumentsLength(
Array.isArray(invokerFns)
? invokerFns[0]
: invokerFns
)
} else {
return (fn._length || fn.length) > ... | Normalize a transition hook's argument length. The hook may be:
- a merged hook (invoker) with the original in .fns
- a wrapped component method (check ._length)
- a plain function (.length) | getHookArgumentsLength | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
function _enter (_, vnode) {
if (vnode.data.show !== true) {
enter(vnode);
}
} | Normalize a transition hook's argument length. The hook may be:
- a merged hook (invoker) with the original in .fns
- a wrapped component method (check ._length)
- a plain function (.length) | _enter | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
remove (vnode, rm) {
/* istanbul ignore else */
if (vnode.data.show !== true) {
leave(vnode, rm);
} else {
rm();
}
} | Normalize a transition hook's argument length. The hook may be:
- a merged hook (invoker) with the original in .fns
- a wrapped component method (check ._length)
- a plain function (.length) | remove | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
inserted (el, binding, vnode, oldVnode) {
if (vnode.tag === 'select') {
// #6903
if (oldVnode.elm && !oldVnode.elm._vOptions) {
mergeVNodeHook(vnode, 'postpatch', () => {
directive.componentUpdated(el, binding, vnode);
});
} else {
setSelected(el, binding, vnode.c... | Not type checking this file because flow doesn't like attaching
properties to Elements. | inserted | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.browser.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.