Insert Node dialog can't create HTML elements

RESOLVED FIXED

Status

Other Applications
DOM Inspector
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: neil@parkwaycc.co.uk, Assigned: Takeshi Kurosawa)

Tracking

({regression})

Trunk
regression

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

3.99 KB, patch
db48x
: review+
neil@parkwaycc.co.uk
: superreview+
Details | Diff | Splinter Review
(Reporter)

Description

10 years ago
dom.js only uses createElementNS to create elements but that can't create HTML elements, only XHTML elements. My personal preference would be for Insert Node to create HTML elements. However the insert node dialog returns no namespace for HTML documents, so I can't even create XHTML elements as a workaround.
(Assignee)

Comment 1

10 years ago
Created attachment 308816 [details] [diff] [review]
Patch

Patch.
I replaced some tabs to spaces (|dom.js|) because I need to change indent level (|if| ~ |else|).
# There are some tabs still.
Assignee: nobody → taken.spc
Status: NEW → ASSIGNED
Attachment #308816 - Flags: review?(db48x)
(Reporter)

Comment 2

10 years ago
(In reply to comment #1)
>Created an attachment (id=308816)
Hmm, so I think it might be better to move the enableNamespaces function into dom.js and pass it in as one of the attr parameters.

> # There are some tabs still.
Eww, who put them there :-(

Updated

10 years ago
Blocks: 420105
(Assignee)

Comment 3

10 years ago
Created attachment 308941 [details] [diff] [review]
Patch v2

make |enableNamespaces| to just a property instead of a function.
Attachment #308816 - Attachment is obsolete: true
Attachment #308941 - Flags: review?(db48x)
Attachment #308816 - Flags: review?(db48x)
Comment on attachment 308941 [details] [diff] [review]
Patch v2

r=db48x, though if there are still tabs anywhere in the file you might as well go ahead and get rid of them (any decent editor can automate the task)
Attachment #308941 - Flags: review?(db48x) → review+
(Reporter)

Comment 5

10 years ago
Comment on attachment 308941 [details] [diff] [review]
Patch v2

Yes, the property looks much better, thanks!
Attachment #308941 - Flags: superreview+
(Assignee)

Comment 6

10 years ago
I don't have cvs commit access. Could someone check this in the tree?
Keywords: checkin-needed
Checking in extensions/inspector/resources/content/viewers/dom/dom.js;
/cvsroot/mozilla/extensions/inspector/resources/content/viewers/dom/dom.js,v  <--  dom.js
new revision: 1.52; previous revision: 1.51
done
Checking in extensions/inspector/resources/content/viewers/dom/insertDialog.js;
/cvsroot/mozilla/extensions/inspector/resources/content/viewers/dom/insertDialog.js,v  <--  insertDialog.js
new revision: 1.2; previous revision: 1.1
done
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.