Ah, good ol' Javascript: where masking over specific methods is a completely valid strategy. 

I don't have qualms with this specific code, per se. My inner security czar is weeping for the language as a whole.