bigskysoftware / bigskysoftware/_hyperscript

behavior does not init properly when parameters are "optional"

Open
#495 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.8k
Forks
172
PR merge metrics
No merged PRs in 30d

Description

I'm using Hyperscript 0.9.12 and attempting to do something similar to what the [Draggable](https://gist.github.com/dz4k/6505fb82ae7fdb0a03e6f3e360931aa9) example does. Default to "me" if a specific click target is not passed in.

The init block does not work.

```

behavior alertMe(clickElement)
init
if no clickElement set the clickElement to me
end

on click from clickElement
call alert('behavior is working!')
end
end

click me

click me
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.