Download the PHP package arts/scroll-timeline-polyfill without Composer

On this page you can find all versions of the php package arts/scroll-timeline-polyfill. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package scroll-timeline-polyfill

arts/scroll-timeline-polyfill

Registers the flackr/scroll-timeline polyfill as a self-gating WordPress script, so CSS scroll-driven animations work in browsers that don't ship them yet (Firefox, at the time of writing).

Browsers with native support download a ~600-byte loader and nothing else. Everyone else gets the polyfill fetched on demand.

Usage

Boot the plugin from your own plugin's bootstrap:

If your plugin prefixes its vendor tree (Strauss and friends), call the prefixed class — the package resolves its own asset URLs from wherever it ends up.

Then depend on the registered handle — that's what orders the loader ahead of your code:

The handle is shared: if two plugins register it, the first wins. Ship the same package version across your plugins so they agree on the patch level.

Driving timelines from JavaScript

The loader appends the polyfill asynchronously, so ViewTimeline is not there on your first tick. Await the loader's promise, which never rejects:

Opting a stylesheet out

The polyfill's CSS layer refetches and re-serializes whole stylesheets through a naive parser. If you drive your animations from JS, or a sheet trips the parser, opt it out by handle:

This tags the <link> with data-aphrodite, the polyfill's own skip vocabulary.

The vendored copy

src/php/libraries/scroll-timeline/scroll-timeline.js is upstream 1.1.0, built and then patched. Upstream is effectively frozen, so the deviations live here rather than as a fork. They're listed in the file's banner; in short:

  1. Per-stylesheet transpile errors are non-fatal. Upstream aborts the entire init when one sheet throws, leaving ViewTimeline undefined and every animation dead. Elementor's own inline CSS does exactly this ("Empty selector" out of the parser).
  2. <link data-aphrodite> opts a sheet out. Upstream honors the attribute on inline <style> only.
  3. The whole body is wrapped in a native-support guard, testing the named timeline syntax alongside the anonymous functions — a browser implementing only part of the feature must not be misread as fully native.
  4. Source measurement bails on detached sources. Upstream throws when an AJAX page swap detaches a timeline source between observer registration and callback.

License

GPL-3.0-or-later. The vendored polyfill is Apache-2.0 (© Google LLC and contributors); its license travels with it in src/php/libraries/scroll-timeline/LICENSE.


All versions of scroll-timeline-polyfill with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
arts/base Version @dev
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package arts/scroll-timeline-polyfill contains the following files

Loading the files please wait ...