We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c7941e commit 14f3f24Copy full SHA for 14f3f24
src/oc-client.js
@@ -723,7 +723,20 @@ export function createOc(oc) {
723
}
724
725
if (this.#manageLifecycle) {
726
- oc.renderNestedComponent(this, () => {});
+ if (this.getAttribute("lazy") === "true") {
727
+ const observer = new IntersectionObserver((entries) => {
728
+ for (const entry of entries) {
729
+ if (entry.isIntersecting) {
730
+ observer.disconnect();
731
+ oc.renderNestedComponent(this, () => {});
732
+ break;
733
+ }
734
735
+ });
736
+ observer.observe(this);
737
+ } else {
738
739
740
741
742
0 commit comments