-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- **Bugfixes:** - use indexOf instead of lastIndexOf to apply on... events - **Enhancements:** - Added Polyfill for eplaceWith - Added Polyfill for eplaceChildren - **Code Quality:** - Fixed a typo
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
# https://github.com/browserslist/browserslist#readme | ||
|
||
> 1% | ||
last 4 version | ||
>= 0.5% | ||
last 2 major versions | ||
not dead | ||
Chrome >= 60 | ||
Firefox >= 60 | ||
# needed since Legacy Edge still has usage; 79 was the first Chromium Edge version | ||
# should be removed in the future when its usage drops or when it's moved to dead browsers | ||
not Edge < 79 | ||
Firefox ESR | ||
iOS >= 10 | ||
Safari >= 10 | ||
Android >= 6 | ||
IE >= 9 | ||
Android >= 56 | ||
not Explorer <= 10 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
require('./utils/polyfills'); | ||
|
||
import WizerdForm from './wizerdForm'; | ||
export default WizerdForm; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* ReplaceWith Polyfill | ||
* @link https://news.ycombinator.com/item?id=17613100 | ||
*/ | ||
if (Element.prototype.replaceWith === undefined) { | ||
Element.prototype.replaceWith = function(replacement: String | Node) { | ||
if (typeof replacement === "string") { | ||
replacement = this.ownerDocument.createTextNode(replacement); | ||
} | ||
this.parentNode.replaceChild(this, replacement); | ||
} | ||
} | ||
|
||
/** | ||
* replaceChildren Polyfill | ||
* @link https://github.com/yuzhe-han/ParentNode-replaceChildren | ||
*/ | ||
if((Node as any).prototype.replaceChildren === undefined) { | ||
(Node as any).prototype.replaceChildren = function(addNodes: any) { | ||
while(this.lastChild) { | ||
this.removeChild(this.lastChild); | ||
} | ||
if (addNodes !== undefined) { | ||
this.append(addNodes); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.