This caught me out the other day too, so if it's not going to be added on a 
whim it could at least be noted as a limitation. Particularly seeing as the 
error message gives a URL to a doc page ... which has no mention of this. 
Triggering an action in JS that takes no parameters seems like a valid use 
case though.

On Monday, June 6, 2016 at 1:11:50 PM UTC+10, Max Goldstein wrote:
>
>  This is not about subscribers, it's for sending out to the JavaScript.
>>
>
> A "subscriber" is the name of the JS function that handles the value sent 
> from Elm. As in, app.ports.fetch.subscribe. But yes, it's not about 
> *subscriptions*. Maybe we need a name change...
>
> I don't think it's a bug so much as an unsupported feature. Subscribers 
> always get passed a value, and you need to send that value from Elm. You 
> can write your JS functions to ignore the argument, but it needs to be done 
> in Elm nonetheless.
>
> Mind you, I don't think allowing ports as commands with no arguments would 
> be a bad change, but it's not going to be added on a whim.
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to