Skip to content

Commit 0c9481c

Browse files
chekoopaMikhail Chekan
andauthored
Set 'autocomplete' attribute type to String (#29)
Co-authored-by: Mikhail Chekan <[email protected]>
1 parent f0b892e commit 0c9481c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Flame/HTML/Attribute/Internal.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,8 +745,8 @@ version = createAttribute "version" <<< show
745745
numOctaves :: ToIntAttribute
746746
numOctaves = createAttribute "numOctaves" <<< show
747747

748-
autocomplete :: ToBooleanAttribute
749-
autocomplete = createProperty "autocomplete" <<< booleanToFalsyString
748+
autocomplete :: ToStringAttribute
749+
autocomplete = createProperty "autocomplete"
750750

751751
autofocus :: ToBooleanAttribute
752752
autofocus = createProperty "autofocus" <<< booleanToFalsyString

test/Main.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,15 @@ main =
182182
HE.br,
183183
HE.text "Test",
184184
HE.button (HA.createAttribute "my-attribute" "myValue") "+",
185-
HE.hr' [HA.autocomplete false, HA.style { border: "200px solid blue"}] ,
185+
HE.hr' [HA.autocomplete "off", HA.style { border: "200px solid blue"}] ,
186186
HE.div_ $ HE.div_ [
187187
HE.span_ [ HE.a [HA.autofocus true] "here" ]
188188
]
189189
]
190190
]
191191
]
192192
html' <- liftEffect $ FRS.render html
193-
TUA.equal """<html lang="en"><head disabled="true"><title>title</title></head><body id="content"><main><button style="display:block;width:20px">-</button><br>Test<button my-attribute="myValue">+</button><hr style="border:200px solid blue"><div><div><span><a autofocus="true">here</a></span></div></div></main></body></html>""" html'
193+
TUA.equal """<html lang="en"><head disabled="true"><title>title</title></head><body id="content"><main><button style="display:block;width:20px">-</button><br>Test<button my-attribute="myValue">+</button><hr autocomplete="off" style="border:200px solid blue"><div><div><span><a autofocus="true">here</a></span></div></div></main></body></html>""" html'
194194

195195
test "events" do
196196
let html = HE.a [HA.onClick unit, HA.onInput (const unit)] [HE.text "TEST"]

0 commit comments

Comments
 (0)