@csedl/svelte-on-rails 0.0.8 → 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/README.md CHANGED
@@ -36,8 +36,8 @@ document.addEventListener('turbo:before-cache', () => {
36
36
  });
37
37
  ```
38
38
 
39
- - The last boolean argument is for debugging logs to the console
40
- - I have inserted very detailed error logs, so please check your browser console for logs.
39
+ - The last boolean argument is for debugging logs to the browser console
40
+ - I also have inserted very detailed error logs.
41
41
 
42
42
  ## How it works
43
43
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@csedl/svelte-on-rails",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "Hydrates or mounts svelte components that are rendered from ruby-gem svelte-on-rails.",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -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-not-initialized-component';
14
+ const virginClass = 'please-hydrate-me-svelte-on-rails';
15
15
  const virginElements = document.getElementsByClassName(virginClass);
16
- debugLog(`Found ${virginElements.length} elements with class "${virginClass}"`, debug);
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