From f6ac3a44e56b46c3af851ca1fd042d285f77a5c5 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 9 Dec 2017 16:00:07 -0500 Subject: [PATCH] remove some unused stuff --- src/generators/dom/State.ts | 4 ---- src/generators/nodes/Attribute.ts | 2 +- src/generators/nodes/Element.ts | 1 - src/generators/nodes/Slot.ts | 10 ---------- 4 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/generators/dom/State.ts b/src/generators/dom/State.ts index 1ca0eff6de..de9814f7df 100644 --- a/src/generators/dom/State.ts +++ b/src/generators/dom/State.ts @@ -4,20 +4,16 @@ interface StateData { namespace?: string; parentNode?: string; parentNodes?: string; - parentNodeName?: string; allUsedContexts?: string[]; usesComponent?: boolean; - selectBindingDependencies?: string[]; } export default class State { namespace?: string; parentNode?: string; parentNodes?: string; - parentNodeName?: string; allUsedContexts?: string[]; usesComponent?: boolean; - selectBindingDependencies?: string[]; constructor(data: StateData = {}) { assign(this, data) diff --git a/src/generators/nodes/Attribute.ts b/src/generators/nodes/Attribute.ts index 54a37571a2..98a63f8ff3 100644 --- a/src/generators/nodes/Attribute.ts +++ b/src/generators/nodes/Attribute.ts @@ -148,7 +148,7 @@ export default class Attribute { } const isSelectValueAttribute = - name === 'value' && state.parentNodeName === 'select'; + name === 'value' && node.name === 'select'; const last = (shouldCache || isSelectValueAttribute) && block.getUniqueName( `${state.parentNode}_${name.replace(/[^a-zA-Z_$]/g, '_')}_value` diff --git a/src/generators/nodes/Element.ts b/src/generators/nodes/Element.ts index 9888811001..668b257b49 100644 --- a/src/generators/nodes/Element.ts +++ b/src/generators/nodes/Element.ts @@ -179,7 +179,6 @@ export default class Element extends Node { const childState = state.child({ parentNode: this.var, parentNodes: block.getUniqueName(`${this.var}_nodes`), - parentNodeName: this.name, namespace: this.name === 'svg' ? 'http://www.w3.org/2000/svg' : state.namespace, diff --git a/src/generators/nodes/Slot.ts b/src/generators/nodes/Slot.ts index 9209533761..a1a07ac2e9 100644 --- a/src/generators/nodes/Slot.ts +++ b/src/generators/nodes/Slot.ts @@ -57,16 +57,6 @@ export default class Slot extends Element { block.builders.unmount.pushCondition(`!${content_name}`); block.builders.destroy.pushCondition(`!${content_name}`); - // const childState = state.child({ - // parentNode: this.var, - // parentNodes: block.getUniqueName(`${this.var}_nodes`), - // parentNodeName: this.name, - // namespace: this.name === 'svg' - // ? 'http://www.w3.org/2000/svg' - // : state.namespace, - // allUsedContexts: [], - // }); - this.children.forEach((child: Node) => { child.build(block, state); });