Skip to content

Track parent tag of properties #13

@cornerman

Description

@cornerman

Currently, the children properties of a tag do not know, into which kind of tag they are inserted. There is no parent relation of the types.

For example, we can currently write something like div(value := "bla"), even though value is only defined on button, option, input, etc and not on div. Additionally, we can currently not type the currentTarget property of events. This is always the object, on which the event listener was attached. So, if we write input(onChange := fun), we know that the type of currentTarget is always html.Input.

We would need a sane syntax for writing this. In scala I can only think about a macro for the tags, that inject the correct types into the code or adds some implicit. Any other ideas?

Also see: outwatch/outwatch#93

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions