# elementor/4.3.0/assets/js/design-system-sync.js

Elementor Website Builder – more than just a page builder, version 4.3.0. 65 lines.

- Page: https://pluginprobe.com/plugins/elementor/4.3.0/code/assets/js/design-system-sync.js
- Raw: https://pluginprobe.com/plugins/elementor/4.3.0/raw/assets/js/design-system-sync.js
- Modified: 2026-09-01T11:47:36+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/elementor/4.3.0/code/assets/js/design-system-sync.js#L10-L20`.

```javascript
(function() {

//#region \0rolldown/runtime.js
	var __defProp = Object.defineProperty;
	var __name = (target, value) => __defProp(target, "name", {
		value,
		configurable: true
	});

//#endregion

//#region modules/design-system-sync/assets/js/design-system-sync-handler.js
	(function() {
		"use strict";
		var SYNC_ENDPOINT = wpApiSettings.root + "elementor/v1/design-system-sync/stylesheet";
		var SYNC_STYLESHEET_ID = "elementor-design-system-sync-css";
		var DEBOUNCE_MS = 500;
		var syncTimeout;
		function syncDesignSystem() {
			fetch(SYNC_ENDPOINT, {
				method: "POST",
				headers: { "X-WP-Nonce": wpApiSettings.nonce }
			}).then(function(response) {
				if (!response.ok) return;
				if (204 === response.status) return;
				return response.json();
			}).then(function(data) {
				if (!data) return;
				refreshGlobals();
				reloadCanvasDesignSyncStyles(data);
			});
		}
		function refreshGlobals() {
			var globals = $e.components.get("globals");
			globals === null || globals === void 0 || globals.refreshGlobalData();
			globals === null || globals === void 0 || globals.populateGlobalData();
		}
		function reloadCanvasDesignSyncStyles(_ref) {
			var url = _ref.url;
			var previewFrame = document.getElementById("elementor-preview-iframe");
			if (!(previewFrame !== null && previewFrame !== void 0 && previewFrame.contentDocument)) return;
			var link = previewFrame.contentDocument.getElementById(SYNC_STYLESHEET_ID);
			if (!link) {
				link = previewFrame.contentDocument.createElement("link");
				link.id = SYNC_STYLESHEET_ID;
				link.rel = "stylesheet";
				previewFrame.contentDocument.head.appendChild(link);
			}
			link.href = url;
		}
		function onClassesUpdated(event) {
			if (event.detail.context !== "frontend") return;
			clearTimeout(syncTimeout);
			syncTimeout = setTimeout(syncDesignSystem, DEBOUNCE_MS);
		}
		window.addEventListener("classes:updated", onClassesUpdated);
		window.addEventListener("variables:updated", function() {
			clearTimeout(syncTimeout);
			syncTimeout = setTimeout(syncDesignSystem, DEBOUNCE_MS);
		});
	})();

//#endregion
})();
//# sourceMappingURL=design-system-sync.js.map
```
