From d62e0991a58faa6cb418e291c0611d9b02275118 Mon Sep 17 00:00:00 2001 From: "vidur%netscape.com" Date: Wed, 22 Jul 1998 23:33:17 +0000 Subject: [PATCH] Fixed HTMLDocument and HTMLCollection interfaces --- dom/public/html/nsIDOMHTMLCollection.h | 5 +- dom/public/html/nsIDOMHTMLDocument.h | 19 +- dom/public/idl/html/HTMLCollection.idl | 4 +- dom/public/idl/html/HTMLDocument.idl | 30 +-- dom/src/base/nsGlobalWindow.cpp | 3 +- dom/src/build/dlldeps.cpp | 4 + dom/src/html/nsJSHTMLCollection.cpp | 23 +- dom/src/html/nsJSHTMLDocument.cpp | 280 ++----------------------- dom/tests/js/lists.html | 66 ++++++ 9 files changed, 119 insertions(+), 315 deletions(-) create mode 100644 dom/tests/js/lists.html diff --git a/dom/public/html/nsIDOMHTMLCollection.h b/dom/public/html/nsIDOMHTMLCollection.h index 3d967eae74f..e3b25a4ac33 100644 --- a/dom/public/html/nsIDOMHTMLCollection.h +++ b/dom/public/html/nsIDOMHTMLCollection.h @@ -34,10 +34,9 @@ class nsIDOMHTMLCollection; class nsIDOMHTMLCollection : public nsISupports { public: - NS_IMETHOD GetLength(PRInt32* aLength)=0; - NS_IMETHOD SetLength(PRInt32 aLength)=0; + NS_IMETHOD GetLength(PRUint32* aLength)=0; - NS_IMETHOD Item(PRInt32 aIndex, nsIDOMNode** aReturn)=0; + NS_IMETHOD Item(PRUint32 aIndex, nsIDOMNode** aReturn)=0; NS_IMETHOD NamedItem(const nsString& aName, nsIDOMNode** aReturn)=0; }; diff --git a/dom/public/html/nsIDOMHTMLDocument.h b/dom/public/html/nsIDOMHTMLDocument.h index cb524d5b010..1c8d836bb36 100644 --- a/dom/public/html/nsIDOMHTMLDocument.h +++ b/dom/public/html/nsIDOMHTMLDocument.h @@ -24,6 +24,7 @@ #include "nsString.h" #include "nsIScriptContext.h" #include "nsIDOMDocument.h" +#include "jsapi.h" class nsIDOMElement; class nsIDOMHTMLElement; @@ -42,54 +43,42 @@ public: NS_IMETHOD SetTitle(const nsString& aTitle)=0; NS_IMETHOD GetReferrer(nsString& aReferrer)=0; - NS_IMETHOD SetReferrer(const nsString& aReferrer)=0; NS_IMETHOD GetFileSize(nsString& aFileSize)=0; - NS_IMETHOD SetFileSize(const nsString& aFileSize)=0; NS_IMETHOD GetFileCreatedDate(nsString& aFileCreatedDate)=0; - NS_IMETHOD SetFileCreatedDate(const nsString& aFileCreatedDate)=0; NS_IMETHOD GetFileModifiedDate(nsString& aFileModifiedDate)=0; - NS_IMETHOD SetFileModifiedDate(const nsString& aFileModifiedDate)=0; NS_IMETHOD GetFileUpdatedDate(nsString& aFileUpdatedDate)=0; - NS_IMETHOD SetFileUpdatedDate(const nsString& aFileUpdatedDate)=0; NS_IMETHOD GetDomain(nsString& aDomain)=0; - NS_IMETHOD SetDomain(const nsString& aDomain)=0; NS_IMETHOD GetURL(nsString& aURL)=0; - NS_IMETHOD SetURL(const nsString& aURL)=0; NS_IMETHOD GetBody(nsIDOMHTMLElement** aBody)=0; NS_IMETHOD SetBody(nsIDOMHTMLElement* aBody)=0; NS_IMETHOD GetImages(nsIDOMHTMLCollection** aImages)=0; - NS_IMETHOD SetImages(nsIDOMHTMLCollection* aImages)=0; NS_IMETHOD GetApplets(nsIDOMHTMLCollection** aApplets)=0; - NS_IMETHOD SetApplets(nsIDOMHTMLCollection* aApplets)=0; NS_IMETHOD GetLinks(nsIDOMHTMLCollection** aLinks)=0; - NS_IMETHOD SetLinks(nsIDOMHTMLCollection* aLinks)=0; NS_IMETHOD GetForms(nsIDOMHTMLCollection** aForms)=0; - NS_IMETHOD SetForms(nsIDOMHTMLCollection* aForms)=0; NS_IMETHOD GetAnchors(nsIDOMHTMLCollection** aAnchors)=0; - NS_IMETHOD SetAnchors(nsIDOMHTMLCollection* aAnchors)=0; NS_IMETHOD GetCookie(nsString& aCookie)=0; NS_IMETHOD SetCookie(const nsString& aCookie)=0; - NS_IMETHOD Open()=0; + NS_IMETHOD Open(JSContext *cx, jsval *argv, PRUint32 argc)=0; NS_IMETHOD Close()=0; - NS_IMETHOD Write(const nsString& aText)=0; + NS_IMETHOD Write(JSContext *cx, jsval *argv, PRUint32 argc)=0; - NS_IMETHOD Writeln(const nsString& aText)=0; + NS_IMETHOD Writeln(JSContext *cx, jsval *argv, PRUint32 argc)=0; NS_IMETHOD GetElementById(const nsString& aElementId, nsIDOMElement** aReturn)=0; diff --git a/dom/public/idl/html/HTMLCollection.idl b/dom/public/idl/html/HTMLCollection.idl index 28772da2456..64ce113c226 100644 --- a/dom/public/idl/html/HTMLCollection.idl +++ b/dom/public/idl/html/HTMLCollection.idl @@ -1,5 +1,5 @@ interface HTMLCollection { - attribute long length; - Node item(in long index); + readonly attribute unsigned long length; + Node item(in unsigned long index); Node namedItem(in wstring name); }; diff --git a/dom/public/idl/html/HTMLDocument.idl b/dom/public/idl/html/HTMLDocument.idl index 9954f0251ac..901e27cbeb6 100644 --- a/dom/public/idl/html/HTMLDocument.idl +++ b/dom/public/idl/html/HTMLDocument.idl @@ -1,23 +1,23 @@ interface HTMLDocument : Document { attribute wstring title; - attribute wstring referrer; - attribute wstring fileSize; - attribute wstring fileCreatedDate; - attribute wstring fileModifiedDate; - attribute wstring fileUpdatedDate; - attribute wstring domain; - attribute wstring URL; + readonly attribute wstring referrer; + readonly attribute wstring fileSize; + readonly attribute wstring fileCreatedDate; + readonly attribute wstring fileModifiedDate; + readonly attribute wstring fileUpdatedDate; + readonly attribute wstring domain; + readonly attribute wstring URL; attribute HTMLElement body; - attribute HTMLCollection images; - attribute HTMLCollection applets; - attribute HTMLCollection links; - attribute HTMLCollection forms; - attribute HTMLCollection anchors; + readonly attribute HTMLCollection images; + readonly attribute HTMLCollection applets; + readonly attribute HTMLCollection links; + readonly attribute HTMLCollection forms; + readonly attribute HTMLCollection anchors; attribute wstring cookie; - void open(); + void open(/* ... */); void close(); - void write(in wstring text); - void writeln(in wstring text); + void write(/* ... */); + void writeln(/* ... */); Element getElementById(in wstring elementId); NodeList getElementsByName(in wstring elementName); }; diff --git a/dom/src/base/nsGlobalWindow.cpp b/dom/src/base/nsGlobalWindow.cpp index 2a749547161..1828dc2115a 100644 --- a/dom/src/base/nsGlobalWindow.cpp +++ b/dom/src/base/nsGlobalWindow.cpp @@ -264,6 +264,7 @@ GlobalWindowImpl::SetNewDocument(nsIDOMDocument *aDocument) } NS_RELEASE(mDocument); + JS_GC((JSContext *)mContext->GetNativeContext()); } mDocument = aDocument; @@ -275,8 +276,6 @@ GlobalWindowImpl::SetNewDocument(nsIDOMDocument *aDocument) mContext->InitContext(this); } } - - JS_GC((JSContext *)mContext->GetNativeContext()); } NS_IMETHODIMP diff --git a/dom/src/build/dlldeps.cpp b/dom/src/build/dlldeps.cpp index 77cc2c8973b..b4da12727f5 100644 --- a/dom/src/build/dlldeps.cpp +++ b/dom/src/build/dlldeps.cpp @@ -18,6 +18,8 @@ #include "nsJSEnvironment.h" #include "nsIScriptGlobalObject.h" #include "nsIDOMNavigator.h" +#include "nsIDOMHTMLDocument.h" +#include "nsIDOMHTMLCollection.h" #include "nsIScriptEventListener.h" // Force references to all of the symbols that we want exported from @@ -28,5 +30,7 @@ void XXXDomNeverCalled() nsJSContext* jcx = new nsJSContext(0); NS_NewScriptGlobalObject(0); NS_NewScriptNavigator(0, 0, 0, 0); + NS_NewScriptHTMLDocument(0, 0, 0, 0); + NS_NewScriptHTMLCollection(0, 0, 0, 0); NS_NewScriptEventListener(0, 0, 0); } diff --git a/dom/src/html/nsJSHTMLCollection.cpp b/dom/src/html/nsJSHTMLCollection.cpp index aa27ad86ef0..6493df43457 100644 --- a/dom/src/html/nsJSHTMLCollection.cpp +++ b/dom/src/html/nsJSHTMLCollection.cpp @@ -63,7 +63,7 @@ GetHTMLCollectionProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) switch(JSVAL_TO_INT(id)) { case HTMLCOLLECTION_LENGTH: { - PRInt32 prop; + PRUint32 prop; if (NS_OK == a->GetLength(&prop)) { *vp = INT_TO_JSVAL(prop); } @@ -129,22 +129,7 @@ SetHTMLCollectionProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { - case HTMLCOLLECTION_LENGTH: - { - PRInt32 prop; - int32 temp; - if (JSVAL_IS_NUMBER(*vp) && JS_ValueToInt32(cx, *vp, &temp)) { - prop = (PRInt32)temp; - } - else { - JS_ReportError(cx, "Parameter must be a number"); - return JS_FALSE; - } - - a->SetLength(prop); - - break; - } + case 0: default: { nsIJSScriptObject *object; @@ -241,7 +226,7 @@ HTMLCollectionItem(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval nsIDOMHTMLCollection *nativeThis = (nsIDOMHTMLCollection*)JS_GetPrivate(cx, obj); JSBool rBool = JS_FALSE; nsIDOMNode* nativeRet; - PRInt32 b0; + PRUint32 b0; *rval = JSVAL_NULL; @@ -368,7 +353,7 @@ JSClass HTMLCollectionClass = { // static JSPropertySpec HTMLCollectionProperties[] = { - {"length", HTMLCOLLECTION_LENGTH, JSPROP_ENUMERATE}, + {"length", HTMLCOLLECTION_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY}, {0} }; diff --git a/dom/src/html/nsJSHTMLDocument.cpp b/dom/src/html/nsJSHTMLDocument.cpp index 8a935de920e..594198166aa 100644 --- a/dom/src/html/nsJSHTMLDocument.cpp +++ b/dom/src/html/nsJSHTMLDocument.cpp @@ -419,111 +419,6 @@ SetHTMLDocumentProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) break; } - case HTMLDOCUMENT_REFERRER: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetReferrer(prop); - - break; - } - case HTMLDOCUMENT_FILESIZE: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetFileSize(prop); - - break; - } - case HTMLDOCUMENT_FILECREATEDDATE: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetFileCreatedDate(prop); - - break; - } - case HTMLDOCUMENT_FILEMODIFIEDDATE: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetFileModifiedDate(prop); - - break; - } - case HTMLDOCUMENT_FILEUPDATEDDATE: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetFileUpdatedDate(prop); - - break; - } - case HTMLDOCUMENT_DOMAIN: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetDomain(prop); - - break; - } - case HTMLDOCUMENT_URL: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetURL(prop); - - break; - } case HTMLDOCUMENT_BODY: { nsIDOMHTMLElement* prop; @@ -547,121 +442,6 @@ SetHTMLDocumentProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (prop) NS_RELEASE(prop); break; } - case HTMLDOCUMENT_IMAGES: - { - nsIDOMHTMLCollection* prop; - if (JSVAL_IS_NULL(*vp)) { - prop = nsnull; - } - else if (JSVAL_IS_OBJECT(*vp)) { - JSObject *jsobj = JSVAL_TO_OBJECT(*vp); - nsISupports *supports = (nsISupports *)JS_GetPrivate(cx, jsobj); - if (NS_OK != supports->QueryInterface(kIHTMLCollectionIID, (void **)&prop)) { - JS_ReportError(cx, "Parameter must be of type HTMLCollection"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - a->SetImages(prop); - if (prop) NS_RELEASE(prop); - break; - } - case HTMLDOCUMENT_APPLETS: - { - nsIDOMHTMLCollection* prop; - if (JSVAL_IS_NULL(*vp)) { - prop = nsnull; - } - else if (JSVAL_IS_OBJECT(*vp)) { - JSObject *jsobj = JSVAL_TO_OBJECT(*vp); - nsISupports *supports = (nsISupports *)JS_GetPrivate(cx, jsobj); - if (NS_OK != supports->QueryInterface(kIHTMLCollectionIID, (void **)&prop)) { - JS_ReportError(cx, "Parameter must be of type HTMLCollection"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - a->SetApplets(prop); - if (prop) NS_RELEASE(prop); - break; - } - case HTMLDOCUMENT_LINKS: - { - nsIDOMHTMLCollection* prop; - if (JSVAL_IS_NULL(*vp)) { - prop = nsnull; - } - else if (JSVAL_IS_OBJECT(*vp)) { - JSObject *jsobj = JSVAL_TO_OBJECT(*vp); - nsISupports *supports = (nsISupports *)JS_GetPrivate(cx, jsobj); - if (NS_OK != supports->QueryInterface(kIHTMLCollectionIID, (void **)&prop)) { - JS_ReportError(cx, "Parameter must be of type HTMLCollection"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - a->SetLinks(prop); - if (prop) NS_RELEASE(prop); - break; - } - case HTMLDOCUMENT_FORMS: - { - nsIDOMHTMLCollection* prop; - if (JSVAL_IS_NULL(*vp)) { - prop = nsnull; - } - else if (JSVAL_IS_OBJECT(*vp)) { - JSObject *jsobj = JSVAL_TO_OBJECT(*vp); - nsISupports *supports = (nsISupports *)JS_GetPrivate(cx, jsobj); - if (NS_OK != supports->QueryInterface(kIHTMLCollectionIID, (void **)&prop)) { - JS_ReportError(cx, "Parameter must be of type HTMLCollection"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - a->SetForms(prop); - if (prop) NS_RELEASE(prop); - break; - } - case HTMLDOCUMENT_ANCHORS: - { - nsIDOMHTMLCollection* prop; - if (JSVAL_IS_NULL(*vp)) { - prop = nsnull; - } - else if (JSVAL_IS_OBJECT(*vp)) { - JSObject *jsobj = JSVAL_TO_OBJECT(*vp); - nsISupports *supports = (nsISupports *)JS_GetPrivate(cx, jsobj); - if (NS_OK != supports->QueryInterface(kIHTMLCollectionIID, (void **)&prop)) { - JS_ReportError(cx, "Parameter must be of type HTMLCollection"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - a->SetAnchors(prop); - if (prop) NS_RELEASE(prop); - break; - } case HTMLDOCUMENT_COOKIE: { nsAutoString prop; @@ -782,7 +562,7 @@ HTMLDocumentOpen(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *r if (argc >= 0) { - if (NS_OK != nativeThis->Open()) { + if (NS_OK != nativeThis->Open(cx, argv+0, argc-0)) { return JS_FALSE; } @@ -838,7 +618,6 @@ HTMLDocumentWrite(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval * { nsIDOMHTMLDocument *nativeThis = (nsIDOMHTMLDocument*)JS_GetPrivate(cx, obj); JSBool rBool = JS_FALSE; - nsAutoString b0; *rval = JSVAL_NULL; @@ -847,24 +626,16 @@ HTMLDocumentWrite(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval * return JS_TRUE; } - if (argc >= 1) { + if (argc >= 0) { - JSString *jsstring0 = JS_ValueToString(cx, argv[0]); - if (nsnull != jsstring0) { - b0.SetString(JS_GetStringChars(jsstring0)); - } - else { - b0.SetString(""); // Should this really be null?? - } - - if (NS_OK != nativeThis->Write(b0)) { + if (NS_OK != nativeThis->Write(cx, argv+0, argc-0)) { return JS_FALSE; } *rval = JSVAL_VOID; } else { - JS_ReportError(cx, "Function write requires 1 parameters"); + JS_ReportError(cx, "Function write requires 0 parameters"); return JS_FALSE; } @@ -880,7 +651,6 @@ HTMLDocumentWriteln(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval { nsIDOMHTMLDocument *nativeThis = (nsIDOMHTMLDocument*)JS_GetPrivate(cx, obj); JSBool rBool = JS_FALSE; - nsAutoString b0; *rval = JSVAL_NULL; @@ -889,24 +659,16 @@ HTMLDocumentWriteln(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval return JS_TRUE; } - if (argc >= 1) { + if (argc >= 0) { - JSString *jsstring0 = JS_ValueToString(cx, argv[0]); - if (nsnull != jsstring0) { - b0.SetString(JS_GetStringChars(jsstring0)); - } - else { - b0.SetString(""); // Should this really be null?? - } - - if (NS_OK != nativeThis->Writeln(b0)) { + if (NS_OK != nativeThis->Writeln(cx, argv+0, argc-0)) { return JS_FALSE; } *rval = JSVAL_VOID; } else { - JS_ReportError(cx, "Function writeln requires 1 parameters"); + JS_ReportError(cx, "Function writeln requires 0 parameters"); return JS_FALSE; } @@ -1054,19 +816,19 @@ JSClass HTMLDocumentClass = { static JSPropertySpec HTMLDocumentProperties[] = { {"title", HTMLDOCUMENT_TITLE, JSPROP_ENUMERATE}, - {"referrer", HTMLDOCUMENT_REFERRER, JSPROP_ENUMERATE}, - {"fileSize", HTMLDOCUMENT_FILESIZE, JSPROP_ENUMERATE}, - {"fileCreatedDate", HTMLDOCUMENT_FILECREATEDDATE, JSPROP_ENUMERATE}, - {"fileModifiedDate", HTMLDOCUMENT_FILEMODIFIEDDATE, JSPROP_ENUMERATE}, - {"fileUpdatedDate", HTMLDOCUMENT_FILEUPDATEDDATE, JSPROP_ENUMERATE}, - {"domain", HTMLDOCUMENT_DOMAIN, JSPROP_ENUMERATE}, - {"URL", HTMLDOCUMENT_URL, JSPROP_ENUMERATE}, + {"referrer", HTMLDOCUMENT_REFERRER, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"fileSize", HTMLDOCUMENT_FILESIZE, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"fileCreatedDate", HTMLDOCUMENT_FILECREATEDDATE, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"fileModifiedDate", HTMLDOCUMENT_FILEMODIFIEDDATE, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"fileUpdatedDate", HTMLDOCUMENT_FILEUPDATEDDATE, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"domain", HTMLDOCUMENT_DOMAIN, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"URL", HTMLDOCUMENT_URL, JSPROP_ENUMERATE | JSPROP_READONLY}, {"body", HTMLDOCUMENT_BODY, JSPROP_ENUMERATE}, - {"images", HTMLDOCUMENT_IMAGES, JSPROP_ENUMERATE}, - {"applets", HTMLDOCUMENT_APPLETS, JSPROP_ENUMERATE}, - {"links", HTMLDOCUMENT_LINKS, JSPROP_ENUMERATE}, - {"forms", HTMLDOCUMENT_FORMS, JSPROP_ENUMERATE}, - {"anchors", HTMLDOCUMENT_ANCHORS, JSPROP_ENUMERATE}, + {"images", HTMLDOCUMENT_IMAGES, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"applets", HTMLDOCUMENT_APPLETS, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"links", HTMLDOCUMENT_LINKS, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"forms", HTMLDOCUMENT_FORMS, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"anchors", HTMLDOCUMENT_ANCHORS, JSPROP_ENUMERATE | JSPROP_READONLY}, {"cookie", HTMLDOCUMENT_COOKIE, JSPROP_ENUMERATE}, {0} }; @@ -1079,8 +841,8 @@ static JSFunctionSpec HTMLDocumentMethods[] = { {"open", HTMLDocumentOpen, 0}, {"close", HTMLDocumentClose, 0}, - {"write", HTMLDocumentWrite, 1}, - {"writeln", HTMLDocumentWriteln, 1}, + {"write", HTMLDocumentWrite, 0}, + {"writeln", HTMLDocumentWriteln, 0}, {"getElementById", HTMLDocumentGetElementById, 1}, {"getElementsByName", HTMLDocumentGetElementsByName, 1}, {0} diff --git a/dom/tests/js/lists.html b/dom/tests/js/lists.html new file mode 100644 index 00000000000..7cbf95069d0 --- /dev/null +++ b/dom/tests/js/lists.html @@ -0,0 +1,66 @@ + + +

This test does a few things: +

+ + + \ No newline at end of file