The :hoplon: ClojureScript Web Framework - http://hoplon.io/

Hi, I noticed the following when trying out hoplon. I couldn’t get a checkbox to work as a controlled element. The app state was correct (e.g. todo completed) and the HTML had checked="checked" set, but the checkbox wasn’t marked. Then I learnt the attribute :checked corresponds to the property :defaultChecked and this is was hoplon updates in (input :type "checkbox" :checked completed?). So instead of (.setAttribute elem "checked" true), we need to do (set! elem.checked true) or (aset elem "checked" true). Did anyone encounter the same thing?

flyboarder 2019-10-10T21:28:44.005700Z

@dmarjenburgh this depends on your attribute provider


I have the default

flyboarder 2019-10-10T21:32:02.006200Z

so no attribute provider?



flyboarder 2019-10-10T21:33:01.007300Z

Then this is correct behavior, attribute providers generally handle this kind of thing, I recommend using hoplon.jquery as it works well and is stable


Ok, thanks