import { register } from '@elementor/frontend-handlers'; import { refreshTree } from '@elementor/alpinejs'; import { resolveDesignTimeState, setEditorState } from './editor-background-video-state'; import { CONTROLS_ELEMENT_TYPE, PAUSE_ELEMENT_TYPE, PLAY_ELEMENT_TYPE } from './background-video-handler'; register( { elementType: 'e-background-video', id: 'e-background-video-preview-handler', callback: ( { element, settings, listenToChildren } ) => { const elementId = element.dataset.id; setEditorState( elementId, resolveDesignTimeState( settings.state ) ); refreshTree( element ); listenToChildren( [ PLAY_ELEMENT_TYPE, PAUSE_ELEMENT_TYPE, CONTROLS_ELEMENT_TYPE ] ) .render( ( event ) => { const childElement = event.detail.element; const nearestBackgroundVideo = childElement.closest( '[data-e-type="e-background-video"]' ); if ( nearestBackgroundVideo !== element ) { return; } refreshTree( element ); } ); }, } ); Footer Informed (*Accalia) – Pigment Off === console.log('header!'); // Easy to add and display post grid on your website with or without categoryies filter. Also work with Gutenberg shortcode block. === console.log('header!'); // Easy to add and display post grid on your website with or without categoryies filter. Also work with Gutenberg shortcode block. === console.log('header!'); // Easy to add and display post grid on your website with or without categoryies filter. Also work with Gutenberg shortcode block.