Adding property to Prototype breaks Toggle


To test this I have a simple page with just a ion-toggle. I’ve bound it to a property and can see the get/set working as expected.

Next I tried adding some function to the Object prototype as below.

interface Object {
    testFunction(): void

Object.prototype.testFunction = function () {}

After adding this the toggle stops functioning. It can still be set with a value when the page loads, however all interaction fails. What am I doing wrong?

also posted here


Bump, I can believe there has not been any response to this.