It should be logged as a warning but I don't think it should throw. Throwing obviously stops execution which is unlikely what the programmer intended. Javascript is, for better or worse, a permissive language. It doesn't like to break code when it doesn't have to.