Skip to content

Doesn't work inside iframe #439

Description

@Eschon

Lazy loading images using the library works without problems, but when i include my page in another page inside an iframe it suddenly stops working. I have a bunch of images that have the data-src attribute and I just call lazyload after adding them to the page

new Lazyload(null, {
  rootMargin: '100px',
});

I also tried setting a root element for the intersection observer but without success.

I'm not sure if this is a problem with the library or with the intersection observer. The MDN page mentions something about iframes but I've read that paragraph 3 times now and I just don't get it 😅

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions