From 780c6803a540407e5eea8f80e038a3fdec36b0d4 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sun, 18 Nov 2018 18:31:20 -0500 Subject: [PATCH] get a few binding tests passing --- .../render-dom/wrappers/Element/Binding.ts | 49 ++++++----------- .../render-dom/wrappers/Element/index.ts | 54 +++++++++---------- src/compile/render-ssr/handlers/Element.ts | 2 +- .../_config.js | 26 ++++----- .../samples/binding-input-checkbox/_config.js | 16 +++--- .../binding-input-range-change/_config.js | 4 +- .../samples/binding-input-range/_config.js | 4 +- .../binding-input-text-contextual/_config.js | 2 +- .../binding-input-text-deep/_config.js | 4 +- .../samples/binding-input-text/_config.js | 4 +- .../samples/binding-textarea/_config.js | 4 +- 11 files changed, 72 insertions(+), 97 deletions(-) diff --git a/src/compile/render-dom/wrappers/Element/Binding.ts b/src/compile/render-dom/wrappers/Element/Binding.ts index 049bc8d07c..ba3f2a3017 100644 --- a/src/compile/render-dom/wrappers/Element/Binding.ts +++ b/src/compile/render-dom/wrappers/Element/Binding.ts @@ -74,8 +74,13 @@ export default class BindingWrapper { let updateConditions: string[] = []; const { name } = getObject(this.node.expression.node); + const { snippet } = this.node.expression; + // TODO unfortunate code is necessary because we need to use `ctx` + // inside the fragment, but not inside the