@kinescope/vue-kinescope-player
Version:
Vue.js wrapper for Kinescope player
16 lines (14 loc) • 386 B
JavaScript
import { IS_BROWSER } from "./constants";
// polyfill for replaceChildren
(function () {
if (IS_BROWSER && Node.prototype.replaceChildren === undefined) {
Node.prototype.replaceChildren = function (addNodes) {
while (this.lastChild) {
this.removeChild(this.lastChild)
}
if (addNodes !== undefined) {
this.append(addNodes)
}
}
}
}())