From 359e67617de5b5a85d29825b35f2d4a059712d4f Mon Sep 17 00:00:00 2001 From: Rich-Harris Date: Tue, 18 Apr 2017 10:56:48 -0400 Subject: [PATCH 1/6] implement bind:currentTime --- .../dom/visitors/Element/Binding.js | 24 ++++++++++++++++--- src/validate/html/validateElement.js | 6 +++++ .../binding-audio-currenttime/_config.js | 16 +++++++++++++ .../binding-audio-currenttime/main.html | 1 + 4 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 test/runtime/samples/binding-audio-currenttime/_config.js create mode 100644 test/runtime/samples/binding-audio-currenttime/main.html diff --git a/src/generators/dom/visitors/Element/Binding.js b/src/generators/dom/visitors/Element/Binding.js index 7e8f38b947..2cc461bcd5 100644 --- a/src/generators/dom/visitors/Element/Binding.js +++ b/src/generators/dom/visitors/Element/Binding.js @@ -19,7 +19,7 @@ export default function visitBinding ( generator, block, state, node, attribute const type = getStaticAttributeValue( node, 'type' ); const bindingGroup = attribute.name === 'group' ? getBindingGroup( generator, keypath ) : null; const value = getBindingValue( generator, block, state, node, attribute, isMultipleSelect, bindingGroup, type ); - const eventName = getBindingEventName( node ); + const eventName = getBindingEventName( node, attribute ); let setter = getSetter({ block, name, keypath, context: '_svelte', attribute, dependencies, value }); let updateElement; @@ -77,6 +77,19 @@ export default function visitBinding ( generator, block, state, node, attribute updateElement = `${state.parentNode}.checked = ${condition};`; } + //