Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (19 sloc) 959 Bytes
extends ../docs-base
block doc
h1 Element referencing
When developing your app, sometimes it is needed for fig to let other
libraries/parts of the code manage the DOM inside your app. For this
reason, fig provides a #[b +skip] mixin, which as the name suggests,
forces fig to ignore that part of the DOM tree after initial render.
The editor you see on this website uses this functionality to let
#[a(href='') CodeMirror] function properly.
p Let's see an example!
include ../../examples/element-referencing
If you open your developer console (F12 in most browsers), you should
see an element being logged. Skipped elements are attached to the
app instance's #[b .ref] property, with their names being determined by
the variable passed to the #[b skip] mixin. For more complex usage, see
the code editor's
#[a(href='') source code].