Frontend Developer Manual / Version 2110
Table Of Contents
The node-decoration-service
brick provides functionality and DOM manipulations based on events
and selectors. It's intention is to support fragment scenarios to enrich pages with other content or components.
Technical Description
The node-decoration-service
will be executed after all DOM ready functions have finished. It only
accepts node decorators on selectors and data attributes based on jQuery.
import { addNodeDecoratorByData } from "@coremedia/brick-node-decoration-service"; // JQuery Document Ready $(function() { // add node decorator for imagemaps addNodeDecoratorByData({}, "cm-imagemap-popup", imageMapAsPopup); });
Example 6.3. Imagemap Example
Note
Please note that this brick contains JavaScript
files, what will automatically be installed, if you add
the brick to your theme package.json
. See Section 5.3, “Using Bricks” to learn how to
install a brick in your theme.