W3C DOM syntax: "setDOMAttribute" vs. "setAttribute" problem

VERIFIED FIXED

Status

()

Core
DOM
P2
trivial
VERIFIED FIXED
20 years ago
11 years ago

People

(Reporter: Angus Davis, Assigned: vidur (gone))

Tracking

Trunk
x86
Windows 95
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

20 years ago
It's a minor syntax incompatibility issue. Here's the simple test case:

<html>
<head>
<script>
// this sets the attribute in the DOM but is non-standard:
document.getElementById("mydiv").setDOMAttribute("ALIGN","right");

// this is the specified API; but it doesn't set the attribute in NGLayout:
document.getElementById("mydiv").setAttribute("ALIGN",right);
</script>
</head>
<body onload="init()">
<div id="mydiv">
Hello, world
</div>
(Assignee)

Updated

20 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 1

20 years ago
I've put in a temporary fix, but I'll leave this bug open until the more
permanent one goes in.

Comment 2

19 years ago
per leger, assigning QA contacts to all open bugs without QA contacts according
to list at http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser
(Assignee)

Updated

19 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
(Assignee)

Comment 3

19 years ago
Don't know why this wasn't closed a long time ago. Needless to say, it's fixed.

Updated

19 years ago
QA Contact: 4015 → 3847

Updated

19 years ago
Status: RESOLVED → REOPENED

Comment 4

19 years ago
Build 1999-06-02-08-M7
I can't get either
document.getElementById("mydiv").setDOMAttribute("ALIGN","right");
or
document.getElementById("mydiv").setAttribute("ALIGN",right);
to work.
(Assignee)

Updated

19 years ago
Status: REOPENED → RESOLVED
Last Resolved: 19 years ago19 years ago
(Assignee)

Comment 5

19 years ago
Try
document.getElementById("mydiv").setAttribute("ALIGN","right");

See the quotes around the "right". Also, if layout doesn't change it's a
different problem. This bug should only be reopened if we get a JavaScript error
saying that setAttribute doesn't exist.

Updated

19 years ago
Status: RESOLVED → VERIFIED

Comment 6

19 years ago
Ok, Thanks Vidur!
Verified
build 1999-06-15-16-M7

Comment 7

11 years ago
denying in-testsuite. we have coverage on this.
Flags: in-testsuite-
You need to log in before you can comment on or make changes to this bug.