Topic on Manual talk:Coding conventions/JavaScript

Jump to navigation Jump to search
Mattflaschen-WMF (talkcontribs)

I understand we should not manipulate the prototype (and I'm fine with the conventions saying that).

However, @Sbisson (WMF) noted that user scripts sometimes manipulate the prototype anyway. So it seems we should take defensive measures when looping nonetheless.

ESanders (WMF) (talkcontribs)

Any such scripts should be strongly advised to stop doing that, and definitely not made available as gadgets. I don't think we need to consider how we support them though - that would be like asking "how do we protect against as user script that has window.mw = null;"

Reply to "Manipulating Object prototype"