Closed Bug 166349 Opened 23 years ago Closed 23 years ago

Alert box chops off blank spaces.

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 50348

People

(Reporter: lapsap7+mz, Assigned: jst)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1b) Gecko/20020826 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1b) Gecko/20020826 Try alert("Hello, hello!"); and you'll see that those blank spaces are condensed to one single blank space. I don't think this is a good idea. For the moment, the only work-around is to use \xA0 like this: alert("Hello.\xA0\xA0\xA0\xA0\xA0\xA0Hello"); Reproducible: Always Steps to Reproduce:
Confirming bug with Mozilla trunk binary 20020828xx on WinNT. The alert() function is part of the DOM, not core JS Engine. ---> DOM Level 0 Compare bug 50348 - duplicate? "alert() strips leading and trailing whitespace of parameter"
Assignee: rogerl → jst
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → DOM Level 0
Ever confirmed: true
QA Contact: pschwartau → desale
Why alert() belongs to DOM1? alert() is a method of "window". I can't find any reference of "window" belonging to DOM1. Correct me if I'm wrong, but please give me an URL.
> Why alert() belongs to DOM1? DOM0, not DOM1. DOM0 == "backwards compatible shit in javascript". See the component descriptions. *** This bug has been marked as a duplicate of 50348 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Verified Duplicate. seak_tengfong@yahoo.com: thank you for this report; you have been cc'ed on the other bug so you can follow progress on this. For reference, the component descriptions for Bugzilla are at http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser Note that |window| is an object created by the DOM. JS Engine deals with lower-level language functionality, such as Number(), Date(), String(), and RegExp(). JS Engine is independent of the browser and does not have the objects |window|, |document|, etc. Those objects, etc., form the "Document Object Model" == DOM
Status: RESOLVED → VERIFIED
Oh sorry, when I saw the letter "D" of DOM, I immediately thought it's about Document and thus didn't pay attention to the number "0". I wonder why it's called DOM 0.
You need to log in before you can comment on or make changes to this bug.