If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

webtree CVS account for Martin Honnen - Martin.Honnen@arcor.de

RESOLVED FIXED

Status

mozilla.org
Repository Account Requests
RESOLVED FIXED
14 years ago
11 years ago

People

(Reporter: Martin Honnen, Assigned: marcia)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

14 years ago
The DOM docs contain errors, the page
  http://www.mozilla.org/docs/dom/domref/dom_el_ref36.html
contains an example that is completely wrong as it passes a string to
dispatchEvent while it needs an event object.
I would like to correct that example. I have heard that the author of the pages,
Oeschger, is no longer at Netscape, so I tried to make the change with
http://doctor.mozilla.org myself and was prompted for CVS account which I try to
open here.
If you google on dispatchEvent 
 
http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=dispatchEvent&btnG=Google+Search
then that pages comes up and I think the example should be fixed.
(Assignee)

Comment 1

14 years ago
Martin: Are you just going to make this change or or this other documentation
that you will work on?  Just wanted to check since we usually give docs access
to people who want to work on docs going forward. Also, I do think Ian O. is
gone, but he may still be maintaining some of these pages so we should also try
to find out what is going on there.

If you just want someone to make this change, I can make it for you - it is up
to you. If you want docs access you will have to get a voucher to post in the
bug and fill out the cvs contributor form which is off the Hacking link.
(Assignee)

Updated

14 years ago
Status: NEW → ASSIGNED
(Reporter)

Comment 2

14 years ago
I am regular in the Mozilla DOM newsgroups and I have found some bugs on the web
site earlier but I used to mail someone given on the page if I had suggestions
on improvements. I think Ian Oeschger used to be named with an email address as
the author of the DOM docs but he isn't any longer and noone else either.
By now I have found another page with the email address oeschger@netscape.com
and tried that today but I got an error that the user doesn't exist:

   ----- The following addresses had permanent fatal errors -----
<oeschger@netscape.com>
    (reason: 550 <oeschger@netscape.com>: Recipient address rejected: This user
does not have an account here (MTA:imta20))

I have also searched bugzilla and the bugs Ian used to own are marked with
  (Ian Oeschger (gone))
so it doesn't look as he is any longer working for Netscape and I don't know how
to contact him.

As I indeed have no concrete plans now which pages else to fix/improve and I
don't know who could vouch for me it might be best if you make the changes 

Let me know how you want the changes, I paste the output of doctor.mozilla.org
with the diffs:

Index: mozilla-org/html/docs/dom/domref/dom_el_ref36.html
===================================================================
RCS file: /cvsroot/mozilla-org/html/docs/dom/domref/dom_el_ref36.html,v
retrieving revision 1.34
diff -u -r1.34 dom_el_ref36.html
--- mozilla-org/html/docs/dom/domref/dom_el_ref36.html	11 Dec 2002 21:52:23
-0000	1.34
+++ mozilla-org/html/docs/dom/domref/dom_el_ref36.html	18 Oct 2003 09:24:56 -0000
@@ -58,19 +58,34 @@
 <table border="1" cellpadding="5" cellspacing="0">
   <caption></caption>
   <tr>
-    <td><font face="courier" color="darkgreen"><pre  class="Preformatted">
-<font face="courier" color="darkgreen">b =
document.getElementById("button1");</font>
-<a name="1020768"> </a>
-<font face="courier" color="darkgreen">res = b.dispatchEvent("click");</font>
-<a name="1020769"> </a>
-<font face="courier" color="darkgreen">if ( res ) {</font>
-<a name="1020770"> </a>
-<font face="courier" color="darkgreen">   // event dispatch was successful</font>
-<a name="1020771"> </a>
-<font face="courier" color="darkgreen">   b.disabled = true;</font>
-<a name="1020772"> </a>
-<font face="courier" color="darkgreen">}</font>
-<a name="1020764"> </a>
+    <td><font face="courier" color="darkgreen"><pre  class="Preformatted"
style="color: darkgreen;">
+  var button;
+  if (document.getElementById) {
+    button = document.getElementById('aButton');
+    if (typeof button.dispatchEvent != 'undefined') {
+      if (typeof document.createEvent != 'undefined') {
+        var mouseEvent = document.createEvent('MouseEvents');
+        mouseEvent.initMouseEvent(
+          'click',
+          true,
+          true,
+          window,
+          1,
+          0,
+          0,
+          0,
+          0,
+          false,
+          false,
+          false,
+          false,
+          0,
+          null
+        );
+        button.dispatchEvent(mouseEvent);
+      } 
+    }
+  }
 </pre>
 </font></td>
   </tr>


Of course I can also make a .html file, let me know whether you want me to mail
that (not sure whether it is a good idea to attach it to this bug)
(Assignee)

Comment 3

14 years ago
Martin: Could you attach a HTML version of the file to this bug?

Comment 4

14 years ago
Martin: Ian Oeschger's email address is oeschger@brownhen.com, so if you want to
ask him about docs and stuff, you can contact him there.
(Reporter)

Comment 5

14 years ago
Adding doronr@us.ibm.com to CC as Ian Oeschger's blog claims Doron is going to
maintain the DOM docs so I guess it is best if Doron decides whether to make the
change I am going to upload next.
(Reporter)

Comment 6

14 years ago
Created attachment 135058 [details]
correction of dispatchEvent DOM doc page

Here is the corrected page, I have left all unchanged besides the example code.
As the previous example code contained a lot of HTML anchors which I can't
relate to I have not used any anchors in the new example code.
(Assignee)

Comment 7

11 years ago
closing this one out.
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.