Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Releases: cee-chen/object-fit-polyfill

v.2.3.5

28 Jan 06:19
Compare
Choose a tag to compare
  • Adds unit tests with 99% code coverage! I'm a real developer, I swear
  • Fix a parseInt missing a base 10 radix (found while writing tests - hooray)

v2.3.4

27 Jan 20:43
Compare
Choose a tag to compare

Adds Typescript definitions to the published package. Typescript should no longer flag warnings/errors when using objectFitPolyfill in an ES6 project like so:

import 'objectFitPolyfill';
window.objectFitPolyfill();

v2.3.3

27 Jan 08:10
Compare
Choose a tag to compare
  • Fix partial Edge support for Edge 16-18 (bug introduced by missing [1] in 2.3.2)

v2.3.2

27 Jan 07:23
Compare
Choose a tag to compare
  • (2.3.1) Upload non-minified source code to npm for other projects that require src for security/open source reasons
  • Remove TODO around Edge partial support (should not affect any Edge 79+ that runs on Chromium, as 79+ has a different user agent)
  • Update README and add a LICENSE file thanks to helpful issues and and PRs from folks - thanks, you all rock!

2.3.0

27 Jun 05:37
Compare
Choose a tag to compare
  • Added support for async loading the polyfill script

2.2.1

26 Jun 18:43
Compare
Choose a tag to compare
  • Fixed an issue where the polyfill was being run on images in Edge when they didn't need to be.

v2.2.0

01 Apr 02:08
Compare
Choose a tag to compare

New Features

  • Added support for object-fit: fill (via data-object-fit="fill")
  • Added support for the <canvas> tag (and actually any element/tag - the polyfill will attempt to position valid nodes, such as <div>s. Object-fit your heart out!)

Docs

  • The demo page has been moved to https://constancecchen.github.io/object-fit-polyfill/demo/
  • Photos and videos are now self-hosted on GitHub/in this repo to avoid issues with dead links
  • In a fit of extreme narcissism, I've also replaced the previous random stock photos with some that I took myself. Enjoy!
  • The cute puppy video should now be playing again!
  • An example of canvas support has been added to the demo page
  • Headings have been added to the demo page to make examples (hopefully) clearer

Tech debt

  • Both npm and bower packaging should now be improved so that only the dist folder is installed
  • Prettier linting should now be in full effect across the codebase
  • Updated dev dependencies to latest / without security vulnerabilities
  • Misc code readability cleanup

v2.1.0

10 Nov 04:06
Compare
Choose a tag to compare
  • Polyfill fix for Edge 16, which released support for object-fit for <img> tags but not for <video> etc.
  • Fix for folks calling the polyfill server-side in, e.g. React

v2.0.5

25 Jun 05:02
Compare
Choose a tag to compare

Allow devs to pass optional DOM elements into objectFitPolyfill()
This will greatly help performance for devs who require polyfilling extra JS functionality such as lazyloading, carousels, and so forth.

v2.0.4

24 Apr 06:24
Compare
Choose a tag to compare

Fix IE9 incompatible classList JS, while keeping the fix for not infinitely appending a CSS class hook