JavaScript : Negative content length