Closed Bug 554236 Opened 16 years ago Closed 16 years ago

TARGET attribute on dynamically added BASE element doesn't work

Categories

(Firefox :: General, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 165208

People

(Reporter: brille1, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2) Gecko/20100115 Firefox/3.6 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2) Gecko/20100115 Firefox/3.6 When adding a BASE HTML element to the HEAD section of a document via DOM methods, the TARGET attribute isn't applied to hyperlinks in the document. Reproducible: Always Steps to Reproduce: 1. Create a document containing two frames. 2. Apply following names to the frames: frame #1: "leftFrame" frame #2: "rightFrame" 3. Link to jQuery via SCRIPT tag. 4. Add following JavaScript to the document: with (frames["leftFrame"].document) {open(); writeln('<?xml version="1.0" encoding="UTF-8"?>'); writeln('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'); writeln('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">'); writeln('<head><title></title>'); writeln('</head><body></body></html>'); close();} doc=$(frames["leftFrame"].document); doc.find("head") .append($(doc.get(0).createElement("base")) .attr("target","rightFrame") .attr("href",location.toString())); doc.find("body").append($(doc.get(0).createElement("a")) .attr("href",location.toString()) .text("Go there")); Actual Results: The hyperlink is opened in the left frame. Expected Results: The hyperlink should open in the right frame.
Duplicate of/related to Core bug 165208?
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.