Kindly EditDocumentationTry the editor

elements.js

The public and preview runtime for native interactive elements. Initializes behavior from saved markup and supports cleanup when leaving preview.

Responsibility#

The public and preview runtime for native interactive elements. Initializes behavior from saved markup and supports cleanup when leaving preview.

File characteristics#

  • Source: assets/elements.js
  • Lines in this release: 1020
  • Type: browser JavaScript

Named browser helpers#

alerts, all, backToTop, carousels, contents, countdowns, counters, focusables, forms, headlines, hidePanel, largest, lightboxes, maps, motion, offcanvas, panelFor, panelTriggers, popupAdblocked, popupAllowed, popupBrowser, popupById, popupConvert, popupCookie, popupCount, popupDid, popupDo, popupEvent, popupFit, popupHide, popupLayer, popupLocalMs, popupMonth, popupOf, popupOs, popupQuery, popupSent, popupShow, popupSiteNow, popupSize, popupSplitPick, popupStore, popupToday, popupToggle, popupTrigger, popupWeek, popups, shares, showLightbox, showPanel, start, step, videoSource, videos.

These functions are internal to the module unless an explicit public contract says otherwise. The list includes nested helpers and is not a global browser API.

Literal event listeners#

DOMContentLoaded, click, close, keydown. Dynamic event names may be assembled elsewhere. Event listeners must follow the owner document when the live device canvas moves page nodes.

Markup attributes used here#

data-cb-address, data-cb-ask, data-cb-autoplay, data-cb-back, data-cb-dismiss, data-cb-done, data-cb-due, data-cb-duration, data-cb-error, data-cb-every, data-cb-form, data-cb-full, data-cb-invalid, data-cb-levels, data-cb-lightbox, data-cb-motion-delay, data-cb-motion-time, data-cb-network, data-cb-next, data-cb-prev, data-cb-scroll, data-cb-start, data-cb-stay, data-cb-step, data-cb-success, data-cb-title, data-cb-video, data-cb-words, data-cb-zoom, data-ke-form-post, data-ke-popup-act, data-ke-popup-on, data-ke-popup-open, data-ke-popup-run. These names can represent authored state, generated output, or temporary editor markers. Use the feature’s save contract before persisting them.

Integration and verification#

Load this file through the plugin’s normal enqueue path so its dependencies and configuration are present. Check the relevant feature after a saved reload, in the live device canvas where applicable, and on the published page. Editor-only UI should not become authored page content. See architecture for the lifecycle and responsive design for document movement.

About this page

Documents Kindly Edit 0.9.16. Source: assets/elements.js. Theme choices and account permissions can change which controls appear.

Type a word or phrase to search the full documentation.