This feature is experimental. It may be changed or removed in a future version without prior notice or deprecation.
Creates an element matching the given CSS selector and attaches it to the given parent element.
To create a detached element from a selector,
element = up.element.affix(document.body, '.klass') element.parentElement // returns document.body element.className // returns 'klass'
parent The parent to which to attach the created element.
selector The CSS selector from which to create an element.
attrs An object of attributes to set on the created element.
An object of CSS properties that will be set as the inline style of the created element.
The created element.