Adding property to Prototype breaks Toggle


#1

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 http://stackoverflow.com/questions/43582873/adding-property-to-prototype-breaks-toggle


#2

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