In ConTeXt mkiv, how do I register a callback? callback.register() does nothing (and IIRC most callbacks are frozen anyway) and somewhere I found tasks.appendaction, but this gives me an error that tasks is not defined (nil).
I'd like to add something to the post_linebreak_filter callback.
Edit: thanks to Khaled's answer and help from the Mailing list, I've got a solution now. The key is to create my own namespace:
moduledata.mystuff={}
and add my function:
moduledata.mystuff.show_hyph = show_hyph
and to register the function to the "finalizers" callbacks, which are the post_linebreak_filter equivalent in ConTeXt.
nodes.tasks.appendaction("finalizers","after","moduledata.mystuff.show_hyph")
See my answer for a complete example