@mathias I read your article about Shapes and Prototypes the other day and I was left with a question.
What happens (performance & memory wise) if you "unshift" the prototype chain of an object? Something like this:pic.twitter.com/igWnZgAYJj
You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more
Any mutation of the prototype chain at runtime invalidates the IC’s ValidityCell, meaning the JavaScript engine has to start over from scratch after that. Explanation: https://mathiasbynens.be/notes/prototypes …
That was the exactly article I was referring to. What I don't get is "what" is lost... I understand that the IC is invalidated, but what parts of it? The IC of A proto chain is lost? Or the B's only? Both? This is driving me crazy...
My real world use case is extending DOM elements like this: `const extDiv = Object.setPrototypeOf(document.getElementById('MyDiv'), ExtendedHTMLElement.prototype)` where `class ExtendedHTMLElement extends HTMLElement`. Does it make sense?
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.