Edit this page

up.fragment :main
HTML selector

A pseudo-selector that matches the layer's main target.

Main targets are default render targets. When no other render target is given, Unpoly will try to find and replace a main target.

In most app layouts the main target should match the primary content area. The default main targets are:

You may configure main target selectors in up.fragment.config.mainTargets.

Also see targeting the main element.

Example

up.render(':main', { url: '/page2' })
This website uses cookies to improve usability and analyze traffic.
I accept or learn more