Walker.js docs
Search
K

Globals

What global properties are, when to use them and how
There might be properties that don't belong to just one event but to all events on a page. Those properties are called the globals and will be collected once, right before the first event got fired. The globals are arbitrary like the data property. What is special about them is that you can define them anywhere on a page by using the data-elbglobals attribute.
<div data-elbglobals="outof:scope"></div>
<div data-elb="entity" data-elb-entity="foo:bar" data-elbaction="load:action" />
This example will lead to the following event:
{
"event": "entity action",
"data": { "foo": "bar" },
"globals": { "outof": "scope" }
// other properties omitted
}
For reasons of performance, the globals are only collected once per run.

Contact us

For more information on any of the things covered in this documentation, you can