Comments (4)
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.
<shadow-meister>
(with display: contents
)
from scrollmeister.
(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.
#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)
- MutationObserver HOT 1
- <content-meister> HOT 2
- <element-meister> -> <section-meister>
- scrollbar behavior
- Experiment with native scrolling on touch HOT 4
- youtube behavior pause outside of viewport
- Web workers HOT 1
- Expose scroll velocity to gl-effect schaders HOT 1
- viewport-events behavior
- Can someone please tell me why fake scrolling is so much smoother on IOS?
- Timing issue with appending new items HOT 10
- RatioType needs to accept floats as well
- clip: true for non-followers
- `default` and conditions
- https://docusaurus.io/
- Allow spacing around scroll-meister
- height: inherit for followers
- media behavior
- scroll-into-view behavior
- DOM manip perf
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scrollmeister.