Flarum (2.x)
    Preparing search index...

    The Fragment class represents a chunk of DOM that is rendered once with Mithril and then takes over control of its own DOM and lifecycle.

    This is very similar to the Component wrapper class, but is used for more fine-grained control over the rendering and display of some significant chunks of the DOM. In contrast to components, fragments do not offer Mithril's lifecycle hooks.

    Use this when you want to enjoy the benefits of JSX / VDOM for initial rendering, combined with small helper methods that then make updates to that DOM directly, instead of fully redrawing everything through Mithril.

    This should only be used when necessary, and only with m.render. If you are unsure whether you need this or Component, you probably need Component`.

    Hierarchy (View Summary)

    Index
    hideHandler: () => void

    post

    post: any
    • Show the button for a selection made by touch: well below its end, or well above its start when there is no room below. A selection taller than the screen leaves room for neither, so the button is kept inside the visible part of the page either way.

      Parameters

      • firstRect: DOMRect

        The client rect of the selection's first line.

      • lastRect: DOMRect

        The client rect of the selection's last line.

      Returns void