From fb9edf2f5739408081afddc35194294ceaac56b5 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 10 Apr 2017 12:00:27 -0400 Subject: [PATCH] align component code more closely with post-refactor element code --- .../dom/visitors/Component/Attribute.js | 67 +++++++++ .../addComponentBinding.js => Binding.js} | 10 +- .../dom/visitors/Component/Component.js | 36 ++++- .../dom/visitors/Component/EventHandler.js | 35 +++++ src/generators/dom/visitors/Component/Ref.js | 13 ++ .../attributes/addComponentAttributes.js | 132 ------------------ 6 files changed, 150 insertions(+), 143 deletions(-) create mode 100644 src/generators/dom/visitors/Component/Attribute.js rename src/generators/dom/visitors/Component/{attributes/addComponentBinding.js => Binding.js} (86%) create mode 100644 src/generators/dom/visitors/Component/EventHandler.js create mode 100644 src/generators/dom/visitors/Component/Ref.js delete mode 100644 src/generators/dom/visitors/Component/attributes/addComponentAttributes.js diff --git a/src/generators/dom/visitors/Component/Attribute.js b/src/generators/dom/visitors/Component/Attribute.js new file mode 100644 index 0000000000..601bc7049f --- /dev/null +++ b/src/generators/dom/visitors/Component/Attribute.js @@ -0,0 +1,67 @@ +export default function visitAttribute ( generator, block, state, node, attribute, local ) { + if ( attribute.value === true ) { + // attributes without values, e.g.