Edit this page

up.fragment up.hello(element, [options])
JavaScript function

Manually compiles a page fragment that has been inserted into the DOM by external code.

All registered compilers and macros will be called with matches in the given element.

As long as you manipulate the DOM using Unpoly, you will never need to call up.hello(). You only need to use up.hello() if the DOM is manipulated without Unpoly' involvement, e.g. by setting the innerHTML property:

element = document.createElement('div')
element.innerHTML = '... HTML that needs to be activated ...'

This function emits the up:fragment:inserted event.


element ElementorjQuery
[options.origin] ElementorjQuery optional

Return value

The compiled element

This website uses cookies to improve usability and analyze traffic.
I accept or learn more