Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
nuxodin committed May 20, 2022
1 parent ec03e22 commit 41206fe
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Initial **2Kb** to polyfill a lot of Stuff.

Add this script on the top of your page:
```html
<script src="https://cdn.jsdelivr.net/gh/nuxodin/lazyfill@1.6.4/mod.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/nuxodin/lazyfill@1.6.7/mod.min.js"></script>
```
**done!**

Expand Down
2 changes: 1 addition & 1 deletion htmlfills.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ document.addEventListener('DOMContentLoaded', function () {
});
/* /onElement */

//var rootSrc = 'https://cdn.jsdelivr.net/gh/nuxodin/lazyfill@1.5.5/polyfills/html/';
//var rootSrc = 'https://cdn.jsdelivr.net/gh/nuxodin/lazyfill@1.6.7/polyfills/html/';

var polyfills = {
dialog: {
Expand Down
4 changes: 2 additions & 2 deletions mod.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
!function(window, document){ 'use strict';
// other libaries should check properties like so: if (prop in obj) { ... }; so the getter will not fire

var root = 'cdn.jsdelivr.net/gh/nuxodin/lazyfill@1.6.6/';
var root = 'cdn.jsdelivr.net/gh/nuxodin/lazyfill@1.6.7/';
var ending = '.min.js';

//var root = 'localhost/github/lazyfill/'; var ending = '.js';
Expand All @@ -26,7 +26,7 @@ var urls = {
'polyfill.io/v3/polyfill.min.js?features=IntersectionObserver':{
'IntersectionObserver':[window]
},
'polyfill.io/v3/polyfill.min.js?features=ResizeObserver':{
'cdn.jsdelivr.net/npm/@juggle/resize-observer@3.3.1/lib/exports/resize-observer.umd.js':{ // dit not work: 'polyfill.io/v3/polyfill.min.js?features=ResizeObserver'
'ResizeObserver':[window]
},
'polyfill.io/v3/polyfill.min.js?features=AbortController':{
Expand Down
1 change: 1 addition & 0 deletions test.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@


<script style="display:block; white-space: pre-wrap; background:#eee; margin:1rem; padding:1rem;">

var body = document.body;

body.innerHTML += 'no polyfill loaded so far.<br>';
Expand Down

0 comments on commit 41206fe

Please sign in to comment.