GithubHelp home page GithubHelp logo

Comments (4)

Prinzhorn avatar Prinzhorn commented on September 13, 2024

Can we "simulate" something like shadow DOM? I mean not really, but like this

<el-meister gl-effect>
    <img src={src}>
    <div data-scrollmeister-shadow />
</el-meister>

Now Scrollmeister can do whatever the f it wants inside data-scrollmeister-shadow, e.g. appending a canvas or the touch overlay. In React we can easily abstract this away and offer an ElMeister component.

<ElMeister gl-effect>
    <img src={src}>
</ElMeister>

...

let {children, ...props} = this.props;

<el-meister {...props}>
    {children}
    <div data-scrollmeister-shadow />
</el-meister>

from scrollmeister.

Prinzhorn avatar Prinzhorn commented on September 13, 2024

<shadow-meister> (with display: contents)

from scrollmeister.

Prinzhorn avatar Prinzhorn commented on September 13, 2024

(with display: contents)

done.

And bonus points for automatically cleaning up children when a behavior is detached (#15). Similar to listen.

The only question is what we do about manipulating attributes. I think touching styles is OK. The bigger issue is data-src and src. But we might as well make the lazy-load behavior configurable. So you can disable the automatic replacement and instead React can listen for events and check el.lazyLoad.loaded prop. This can also be useful for other cases where you don't have a data-src but want to lazily fetch() a resource. Behaviors that need this can then connectTo lazyload.

from scrollmeister.

Prinzhorn avatar Prinzhorn commented on September 13, 2024

#22 is related is well. Scrollmeister works great so far for static HTML, but DOM manipulation using React, jQuery or plain setAttribute etc. are not done yet.

from scrollmeister.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.