(data, props, children, parent, Ctor)
| 3795 | /* */ |
| 3796 | |
| 3797 | function FunctionalRenderContext(data, props, children, parent, Ctor) { |
| 3798 | var options = Ctor.options; |
| 3799 | // ensure the createElement function in functional components |
| 3800 | // gets a unique context - this is necessary for correct named slot check |
| 3801 | var contextVm; |
| 3802 | if (hasOwn(parent, "_uid")) { |
| 3803 | contextVm = Object.create(parent); |
| 3804 | // $flow-disable-line |
| 3805 | contextVm._original = parent; |
| 3806 | } else { |
| 3807 | // the context vm passed in is a functional context as well. |
| 3808 | // in this case we want to make sure we are able to get a hold to the |
| 3809 | // real context instance. |
| 3810 | contextVm = parent; |
| 3811 | // $flow-disable-line |
| 3812 | parent = parent._original; |
| 3813 | } |
| 3814 | var isCompiled = isTrue(options._compiled); |
| 3815 | var needNormalization = !isCompiled; |
| 3816 | |
| 3817 | this.data = data; |
| 3818 | this.props = props; |
| 3819 | this.children = children; |
| 3820 | this.parent = parent; |
| 3821 | this.listeners = data.on || emptyObject; |
| 3822 | this.injections = resolveInject(options.inject, parent); |
| 3823 | this.slots = function() { |
| 3824 | return resolveSlots(children, parent); |
| 3825 | }; |
| 3826 | |
| 3827 | // support for compiled functional template |
| 3828 | if (isCompiled) { |
| 3829 | // exposing $options for renderStatic() |
| 3830 | this.$options = options; |
| 3831 | // pre-resolve slots for renderSlot() |
| 3832 | this.$slots = this.slots(); |
| 3833 | this.$scopedSlots = data.scopedSlots || emptyObject; |
| 3834 | } |
| 3835 | |
| 3836 | if (options._scopeId) { |
| 3837 | this._c = function(a, b, c, d) { |
| 3838 | var vnode = createElement(contextVm, a, b, c, d, needNormalization); |
| 3839 | if (vnode && !Array.isArray(vnode)) { |
| 3840 | vnode.fnScopeId = options._scopeId; |
| 3841 | vnode.fnContext = parent; |
| 3842 | } |
| 3843 | return vnode; |
| 3844 | }; |
| 3845 | } else { |
| 3846 | this._c = function(a, b, c, d) { |
| 3847 | return createElement(contextVm, a, b, c, d, needNormalization); |
| 3848 | }; |
| 3849 | } |
| 3850 | } |
| 3851 | |
| 3852 | installRenderHelpers(FunctionalRenderContext.prototype); |
| 3853 |
nothing calls this directly
no test coverage detected