Skip to content

Mount straight on DOMNode #90

Open
@YanikCeulemans

Description

@YanikCeulemans

Hi, I'm loving Flame and was looking for a way to mount a flame application straight on a DOMNode, Web.DOM.Internal.Types.Element or something similar. The docs show that this is not possible, only through a QuerySelector can you mount a Flame application. However, I already have a node without anything to select on with a QuerySelector.

This makes it quite awkward to mount the application to. My current approach is:

  1. Generate a unique identifier
  2. Assign it to the id of the node
  3. Concat "#" with the the id
  4. Pass the result to the QuerySelector constructor
  5. Pass the QuerySelector to the mount function

I have already taken a look at the source of the current Flame.Application.EffectList.mount function, it calls the run function which takes a Node as one of its parameters. However, the run function is not exposed from the module.

Would you be open to consider exposing an additional mount function that takes some sort of Node?

Thanks in advance!
Kind regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions