Skip to content

hook=(hook 'a' b='c') works, not documented #38

@jamesarosen

Description

@jamesarosen

The README talks about two ways of adding hooks:

{{!-- for elements, use the `hook` helper --}}
<div data-test={{hook 'a' b='c'}}>

{{!-- for components, use the `hook` and `hookQualifiers` attributes --}}
{{my-component
  hook='a'
  hookQualifiers=(hash b='c')
}}

This also works, but is not documented:

{{my-component hook=(hook 'a' b='c')}}

It adds an additional &^%^& to the end:

<div class='my-component data-test='a&^%^&b=c&^%^&&^%^&'>

but the hook and $hook test helpers don't seem to care about that.

If this is something we should expect to work, let's document and test it. If it's not supposed to work, perhaps we should assert that the hook attribute's value doesn't itself contain &^%^&.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions