-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
FIX for #35: Webpack 5 compatibility
- Loading branch information
Showing
54 changed files
with
3,558 additions
and
3,010 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,9 @@ An accessible polyfill for `<input type='time'/>` elements. | |
Demo available here: https://dan503.github.io/time-input-polyfill/ | ||
|
||
<details> | ||
<summary>The recommended version is <code>1.0.10</code> or higher.</summary> | ||
<summary>The recommended version is <code>1.0.11</code> or higher.</summary> | ||
|
||
<p>If the recommended version in this documentation is out of sync with the npm version, this is because npm only allows readme edits to be committed through full releases. To prevent needless cache invalidation, I'll only update the recommended version number when there are actual changes to the polyfill code. The current recommended version is <code>1.0.10</code>. As long as you are using a version that is equal to or higher than that, you are using the latest version of the polyfill.</p> | ||
<p>If the recommended version in this documentation is out of sync with the npm version, this is because npm only allows readme edits to be committed through full releases. To prevent needless cache invalidation, I'll only update the recommended version number when there are actual changes to the polyfill code. The current recommended version is <code>1.0.11</code>. As long as you are using a version that is equal to or higher than that, you are using the latest version of the polyfill.</p> | ||
|
||
</details> | ||
|
||
|
@@ -59,7 +59,7 @@ You didn't load the actual polyfill onto the page, you loaded a much smaller aut | |
1. The initialiser checks if the browser supports `input[type="time"]` elements. | ||
2. If it **does**, it skips the rest of the functionality. | ||
3. If it does **not**, it will: | ||
1. load `https://cdn.jsdelivr.net/npm/[email protected].10/dist/time-input-polyfill.min.js` (the actual polyfill). | ||
1. load `https://cdn.jsdelivr.net/npm/[email protected].11/dist/time-input-polyfill.min.js` (the actual polyfill). | ||
2. Collect all existing `input[type="time"]` elements on the page. | ||
3. Loop through each `input[type="time"]` element and apply the polyfill to it. | ||
|
||
|
@@ -103,7 +103,7 @@ if (!supportsTime) { | |
First check for `input[type="time"]` support. | ||
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].10/core/helpers/supportsTime.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].11/core/helpers/supportsTime.js"></script> | ||
``` | ||
|
||
```js | ||
|
@@ -115,8 +115,8 @@ if (!supportsTime) { | |
Then gather a list of all `input[type="time"]` elements on the page, and loop through them to apply the polyfill. | ||
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].10/core/helpers/supportsTime.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].10/dist/time-input-polyfill.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].11/core/helpers/supportsTime.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].11/dist/time-input-polyfill.min.js"></script> | ||
``` | ||
|
||
```js | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import supports_time from './core/helpers/supportsTime' | ||
import loadJS from './core/helpers/loadJS' | ||
import supports_time from './core/helpers/supportsTime.js' | ||
import loadJS from './core/helpers/loadJS.js' | ||
|
||
document.addEventListener('DOMContentLoaded', () => { | ||
if (!supports_time) { | ||
loadJS( | ||
'https://cdn.jsdelivr.net/npm/[email protected].10/dist/time-input-polyfill.min.js', | ||
'https://cdn.jsdelivr.net/npm/[email protected].11/dist/time-input-polyfill.min.js', | ||
() => { | ||
var $inputs = [].slice.call( | ||
document.querySelectorAll('input[type="time"]') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.