Tengo un código externo que define la variable Modal y tampoco puedo cambiar esta declaración.
var Modal = function (element, options) { this.options = options this.$body = $(document.body) this.$element = $(element) this.$dialog = this.$element.find('.modal-dialog') this.$backdrop = null this.isShown = null this.originalBodyPad = null this.scrollbarWidth = 0 this.ignoreBackdropClick = false if (this.options.remote) { this.$element .find('.modal-content') .load(this.options.remote, $.proxy(function () { this.$element.trigger('loaded.bs.modal') }, this)) } } Quiero establecer el valor isShown en falso. De esta forma Modal.isShown=false; pero la propiedad isShown no es accesible. Cómo puedo acceder y cambiar su valor.
Esta es una función constructora. Pruebe el siguiente código.
const modalNew = new Modal(elment,options); modalNew.isShown = false;Deberá pasar el elemento y las opciones.