Comments (6)
When loading the library via a <script>
tag the API is available on window.raf
. To automatically polyfill window.requestAnimationFrame
and window.cancelAnimationFrame
you can invoke window.raf.polyfill()
. This is documented here.
from raf.
Run it through browserify. http://wzrd.in may help you transition to a build process.
from raf.
@ljharb Thanks for the response.
But I can confirm that:
https://wzrd.in/standalone/[email protected]
https://wzrd.in/standalone/raf@latest
does not produce code that polyfills requestAnimationFrame
.
from raf.
@milosdjakonovic indeed, the module doesn't polyfill by default. What you want is require('raf/polyfill')
, and to have that go through your browserify/webpack build process.
from raf.
@ljharb @CMTegner
Worked, thanks.
from raf.
I added these instructions to the README. Thanks for bringing this up @milosdjakonovic!
from raf.
Related Issues (16)
- `npm test` hangs in node
- move polyfill into seperate file HOT 3
- not working on 0.10.30 HOT 2
- Not working on Android 4.0 HOT 3
- poor debugging experience in Chrome HOT 13
- Provide a bower.json HOT 3
- Add license header to dist files HOT 4
- Missing LICENSE file HOT 8
- Add UMD bundle to npm package HOT 2
- CHANGELOG missing HOT 1
- Missing LICENSE file in release tarball. HOT 2
- Why use a calculated delay value 'next' in instead of zero? HOT 2
- Security issue through preformance-now HOT 4
- GraalVM support? ReferenceError: global is not defined HOT 6
- Proposal: Splitting up and improving raf HOT 7
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 raf.