funcool / funcool/clojurescript-unraveled

Section 4.4.2 -> Function on-change

Open
#159 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
XSLT
Stars
479
Forks
53
PR merge metrics
No merged PRs in 30d

Description

In order to create what I believe to be the intended behavior I needed to make the definition of the "on-change" function the following:

```clojure
(defn on-change
[event]
(let [target (.-target event)
value-string (.-value target)]
(if (str/blank? value-string)
(set! (.-innerHTML result) "----")
(let [value (read-string value-string)]
(if (leap? value)
(set! (.-innerHTML result) "YES")
(set! (.-innerHTML result) "NO"))))))
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Review Section 4.4.2 and locate the example defining the on-change function. Compare it with the definition in the issue, then update the section so the example handles blank input and displays the leap-year result as shown; done when the documented function matches the intended behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.