ohzi-core 10.4.0 → 10.4.2

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ohzi-core",
3
- "version": "10.4.0",
3
+ "version": "10.4.2",
4
4
  "description": "OHZI Core Library",
5
5
  "source": "src/index.js",
6
6
  "module": "build/index.module.js",
@@ -41,6 +41,36 @@ class HTMLUtilities
41
41
  }
42
42
  }
43
43
  }
44
+
45
+ static load_iframes(container)
46
+ {
47
+ const iframes = container.querySelectorAll('iframe');
48
+
49
+ for (let i = 0; i < iframes.length; i++)
50
+ {
51
+ const iframe = iframes[i];
52
+
53
+ if (iframe.dataset.src)
54
+ {
55
+ iframe.src = iframe.dataset.src;
56
+ }
57
+ }
58
+ }
59
+
60
+ static load_elements(container, selector)
61
+ {
62
+ const elements = container.querySelectorAll(selector);
63
+
64
+ for (let i = 0; i < elements.length; i++)
65
+ {
66
+ const element = elements[i];
67
+
68
+ if (element.dataset.src)
69
+ {
70
+ element.src = element.dataset.src;
71
+ }
72
+ }
73
+ }
44
74
  }
45
75
 
46
76
  export { HTMLUtilities };