From 10facbe2e6f7492042559095bc15c18ab3f70865 Mon Sep 17 00:00:00 2001 From: Andreev Sergey Date: Thu, 14 Jul 2016 22:36:31 +0600 Subject: [PATCH 1/2] # 29rename attribute autoComplete to autocomplete --- lib/get-property-info/htmldom/property-config.js | 2 +- .../lib/convert-tag-attributes/properties.js | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/get-property-info/htmldom/property-config.js b/lib/get-property-info/htmldom/property-config.js index 05ee3d4..ddbdb91 100644 --- a/lib/get-property-info/htmldom/property-config.js +++ b/lib/get-property-info/htmldom/property-config.js @@ -26,7 +26,7 @@ var HTMLDOMPropertyConfig = { allowTransparency: MUST_USE_ATTRIBUTE, alt: null, async: HAS_BOOLEAN_VALUE, - autoComplete: null, + autocomplete: null, autoFocus: HAS_BOOLEAN_VALUE, autoPlay: HAS_BOOLEAN_VALUE, capture: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, diff --git a/test/html-to-vdom/lib/convert-tag-attributes/properties.js b/test/html-to-vdom/lib/convert-tag-attributes/properties.js index 0e1e2b2..b36aa4f 100644 --- a/test/html-to-vdom/lib/convert-tag-attributes/properties.js +++ b/test/html-to-vdom/lib/convert-tag-attributes/properties.js @@ -51,6 +51,16 @@ describe('convertTagAttributes', function () { attributes: {} }); }); + it('autocomplete not camelCase', function () { + var tag = parseHTML('')[0]; + + var converted = convertTagAttributes(tag); + converted.should.eql({ + autocomplete: "off", + type: "text", + attributes: {} + }); + }); }); }); }); From b73d45a302da8700ceb418bccc2b265710eb426d Mon Sep 17 00:00:00 2001 From: Andreev Sergey Date: Thu, 14 Jul 2016 22:43:47 +0600 Subject: [PATCH 2/2] fix code style --- test/html-to-vdom/lib/convert-tag-attributes/properties.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/html-to-vdom/lib/convert-tag-attributes/properties.js b/test/html-to-vdom/lib/convert-tag-attributes/properties.js index b36aa4f..1e2d77c 100644 --- a/test/html-to-vdom/lib/convert-tag-attributes/properties.js +++ b/test/html-to-vdom/lib/convert-tag-attributes/properties.js @@ -56,8 +56,8 @@ describe('convertTagAttributes', function () { var converted = convertTagAttributes(tag); converted.should.eql({ - autocomplete: "off", - type: "text", + autocomplete: 'off', + type: 'text', attributes: {} }); });