Skip to content

Latest commit

 

History

History

ref

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

*ref="name"

Version Phase
82 — REFERENCE

Create a reference to an element for later use.

<div *ref="foo" data-text="bar">
  <!--<p *text="$refs.foo.dataset.text"></p>-->
</div>

Notes

Note

Redefining a reference will shadow its previous value within the current subtree, without affecting its value in the parent subtree.

Variables

$refs: Record<PropertyKey, HTMLElement>

A collection of all referenced elements within the current subtree.

Modifiers

.raw[boolean=true]

Skip expression evaluation if set.