Closed
Bug 1305
Opened 26 years ago
Closed 26 years ago
W3C DOM syntax: "setDOMAttribute" vs. "setAttribute" problem
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
VERIFIED
FIXED
People
(Reporter: angus, Assigned: vidur)
Details
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•26 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•26 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•26 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•26 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 3•26 years ago
|
||
Don't know why this wasn't closed a long time ago. Needless to say, it's fixed.
Updated•26 years ago
|
Status: RESOLVED → REOPENED
Comment 4•26 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•26 years ago
|
Status: REOPENED → RESOLVED
Closed: 26 years ago → 26 years ago
Assignee | ||
Comment 5•26 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•26 years ago
|
Status: RESOLVED → VERIFIED
Comment 6•26 years ago
|
||
Ok, Thanks Vidur!
Verified
build 1999-06-15-16-M7
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•