Some recommend using the role attribute to bind your behaviors. To aid this, you can define behaviors as @xxxx
, which is shorthand of [role~="xxxx"]
. (This convention is taken from jquery-role.)
$.onmount('@hiding-menu', function () {
/* ... */
})
/* same as $.onmount('[role~="hiding-menu"]', ...) */