Firstly, I have a problem with OOP in javascript and I understand very little about it, but I need to solve the problem ...
Well, I'm trying to use the Bootstrap 3 library in Bootstrap 4: https://github.com/nakupanda/bootstrap3-dialog
I get the following error: "Unable to call class as function"
Looking at the code, I found something:
1 - classCallCheck: this is a function that throws an error. I believe this forces the user to use the βnewβ and instantiate the object and never call it as a function;
2 - createClass: this is a function that builds classes, so classes in Bootstrap 4 are not conditionally defined.
3 - inherits: this is another function and shows that inheritance is also not ordinary.
4 - The library has this code to extend Bootstrap modality:
var BootstrapDialogModal = function (element, options) { Modal.call(this, element, options); };
But Modal.call causes an error: "It is impossible to call a class as a function."
I suppose the only problem is that BootstrapDialogModal inherits Modal under the inheritance conditions imposed by Bootstrap 3, and when Bootstrap 4 is active, these conditions do not match.
Follow jsfiddle: http://jsfiddle.net/g6nrnvwu/
Does anyone know how I can configure this code?
Thanks.