Load some PAML as XML, returning a valid Phosphor widget.
The loader walks through the XML tree, breadth-first, to create a widget matching the markup. For each element it encounters, it creates a corresponding widget using the WidgetFactory, and then sets any attached properties by looking for attributes that begin with an upper-case letter.
Node attributes that begin with a lowercase letter are correspondingly set on the DOM, including data-attrs.
Phosphor attached properties are hacked in right now, as most of them aren't publicly exposed.
Generated using TypeDoc
Class for loading PAM markup and transforming it into a Phosphor widget.
PAM markup is relatively straight-forward, and is written in XML. A simple view might look like this:
<BoxPanel> <Label BoxLayout.SizeBasis="10">Hello, world!</Label> <Image href="https://placekitten.com/g/300/300" /> </BoxPanel>
This creates a
BoxPanel
with a Label and an Image. The Label has an "Attached Property" specified-BoxLayout.SizeBasis
tells BoxLayout how big (in pixels) to make a particular widget.Element attributes in lowercase (such as data attributes and HTML attrs) get copied to the DOM, so the
img
element of theImage
widget above gets it'ssrc
set.See the Builtin Reference for details on what is included with base PAM