npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mathml-polyfills

v0.1.2

Published

The numerous MathML polyfills can be used as one standard tool that processes all MathML elements so that they become MathML-core compatible. This is done by the functions referenced from `_MathMLTransforms` at load time and any time the scripts ask.

Readme

MathML Polyfills Packages

The numerous MathML polyfills can be used as one standard tool that processes all MathML elements so that they become MathML-core compatible. This is done by the functions referenced from _MathMLTransforms at load time and any time the scripts ask.

By default, the script or module processes all math elements in the web-page after the load. Should you want to disable this, define before the inclusion or imports, window.doNotRunTransformsOnPageLoad = true.

Building the bundles

The repository carries the latest results of the build since we last ran it. So you can just use that first.

Building again:

  • Go to the rollup folder and invoke: npm install then invoke npm run build.
  • Or, if you have installed rollup globally, you can invoke ./rollup-polyfills.

This will create the files allpolyfillsbundle-module.js and allpolyfillsbundle-script.js in this directory.

Tests

The packaging in all forms is tested in the folder test-rollup-wraps.

Use as a script element

You can copy the file allpolyfillsbundle-script.js to your js directory and use the MathML polyfills in HTML with an element such as:

<script src="js/allpolyfillsbundle-script.js"></script>

For those who want to avoid copying, you can use the github-pages version

<script src="https://w3c.github.io/mathml-polyfills/rollup/allpolyfillsbundle-script.js"></script>

But note that the gains in performance or security may not be as you expect (see this page for more).

Use an ES6 module

In a script of type module (supported in all current browsers) you can use MathML polyfills with import {_MathTransforms} from "./allpolyfillsbundle-module.js".

Use an NPM package

Add the mathml-polyfills package to your dependencies: From your project, run:

npm install --save mathml-polyfills

You can now refer to the MathML polyfills with the following import:

import {_MathTransforms} from "@w3c-math/mathml-polyfills"

Once one of the import methods has been used you can use the _MathTransforms object:

  • to invoke _MathTransform.transform on freshly appeared math elements
  • to invoke _MathTransform._createStylesheet to create the stylesheet to be included
  • ... to use the _MathTransform.plugins to operate single transformations