non-breaking changes:
- add webp data url support
- WebpMachine option
useCanvasElements
is now auto-detected via the newly availabledetectCanvasReadingSupport
function - polyfill functions no longer throw errors, merely console.error them
- WebpMachine option
webpSupport
no longer has to be a promise, it can just be a boolean (or a promised boolean)
non-breaking changes:
- improve canvas helper functions, in the way they copy dimensions and styles
WebpMachine.replaceImageWithCanvas
WebpMachine.cloneCanvas
non-breaking changes:
- add static member canvas helpers to WebpMachine
WebpMachine.replaceImageWithCanvas
WebpMachine.cloneCanvas
- improve canvas helper functions, fix scrolling while hovering over canvas
- improve demo page
non-breaking changes:
- add
useCanvasElements
boolean option to WebpMachine, which causes webp-hero to polyfill by wholly replacing webp image elements with canvas elements
non-breaking changes:
- fix issue #40 where webp build was requiring node modules like fs
we finally have a fresh new working build of libwebp. this unblocks webp-hero development
non-breaking changes:
- add webp-machine
clearCache
method so you can manually save memory 8ace812 - rework readme
- merge @theonetheycallneo's base64 support a4cb1f8
- fix input blocking via
doNotCaptureKeyboard
cda1bd6
non-breaking changes:
- update all dependencies (didn't update libwebp, just webp-hero npm deps)
- remove .npmrc 'save-exact' mode
non-breaking changes:
-
add webp-machine option "detectWebpImage" which takes an HTMLImageElement and returns a boolean indicating whether or not the image is webp
special thanks to @mikunimaru and @Lobasya for contributing issues and pr's on this
non-breaking changes:
- upgrade to libwebp 1326988 — 2019-04-18
- upgrade to emscripten 1.38.30 — 2019-03-21
- upgrade to typescript 3.4.5
- add package.json "module" field
non-breaking changes:
- fix error handling (thanks @Drummi42 for issue #15)
- fix webp-machine caching (thanks @bake for pr #14)
introducing proper es-modules, just to be future-proof and cool
however the browserify bundle generated via the commonjs build will be the most compatible with the 'ol ie11
breaking:
dist/
now contains a new es-module builddist-cjs/
now contains the old commonjs equivalent- update package.json
main
field to point atdist-cjs
, also typings updated - move
dist/webp-hero.bundle.js
intodist-cjs/
- move
dist/polyfills.js
intodist-cjs/
non-breaking:
- update readme with es-module usage example
- add
esm.html
demo page example using es-modules instead of bundle
non-breaking changes:
- added support for ie11 via optional
dist/polyfills.js
- update readme examples to support ie11
breaking changes:
- fix interface name from
WebpHeroOptions
toWebpMachineOptions
other changes:
- update readme and packages
- optimize
webp-herp.bundle.js
via tinyify - improve error handling by not logging anything to console
- rename
dist/webp-hero.polyfill.bundle.js
todist/webp-hero.bundle.js
and require you to interact with it to activate the polyfill<!-- replace this: --> <script src="webp-hero/dist/webp-hero.polyfill.bundle.js"></script> <!-- with this: --> <script src="webp-hero/dist/webp-hero.bundle.js"></script> <script> const {WebpMachine} = webpHero const webpMachine = new WebpMachine() webpMachine.polyfillDocument() </script>
- rename
dwebp
to justwebp
- replace all default exports with named exports
- replace
WebpHero
class withWebpMachine
WebpMachine
class methodpolyfill
renamed topolyfillDocument
WebpMachine
class methodpolyfillImage
can polyfill a single img element- functions
detectWebpSupport
andloadBinaryData
now available - update
libwebp
source to latest version libwebp/dist/webp.js
commonjs module is now built inside the docker container