@csedl/svelte-on-rails 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -11,9 +11,9 @@ const svelteInstances = new WeakMap();
|
|
|
11
11
|
* @param {boolean} debug - Enable debug logging
|
|
12
12
|
*/
|
|
13
13
|
export function initializeSvelteComponents(componentsRoot, components, debug = false) {
|
|
14
|
-
const virginClass = 'svelte-on-rails
|
|
14
|
+
const virginClass = 'please-hydrate-me-svelte-on-rails';
|
|
15
15
|
const virginElements = document.getElementsByClassName(virginClass);
|
|
16
|
-
debugLog(`Found ${virginElements.length} elements with class
|
|
16
|
+
debugLog(`Found ${virginElements.length} elements with class «${virginClass}»`, debug);
|
|
17
17
|
if (virginElements.length === 0) return;
|
|
18
18
|
|
|
19
19
|
// Convert live HTMLCollection to a static array
|