Skip to content

Support XUL #4138

@jlongster

Description

@jlongster

I'm filing this issue because we are seriously looking at using React in Firefox devtools, and I'm starting to work on migrating a few of our components. XUL has weird constraints on the format of the DOM in edge cases, and I hope that somehow we can make it work. Long-term we want to migrate away from XUL but that's not an option for a while.

React.createElement works very nicely to create all the custom XUL elements.

The first thing I ran into is boolean attributes. In XUL, you always have to specify a property value, so <foo hidden> is invalid, it must be <foo hidden="true">. I fixed it for the hidden attribute by changing

hidden: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,

to just

hidden: MUST_USE_ATTRIBUTE,

in the HTMLDOMPropertyConfig option. I foresee having to customize this object more. An interesting solution would be a private API to override this config somehow. I'm not well along enough yet to suggest a real solution, but I want to document things as I hit them.

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