Closed Bug 199191 Opened 22 years ago Closed 11 years ago

merlindata.com - Uses insertAdjacentElement function (IE)

Categories

(Tech Evangelism Graveyard :: English US, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: adcroft, Unassigned)

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (OS/2; U; Warp 4; en-US; rv:1.3) Gecko/20030313
Build Identifier: Mozilla/5.0 (OS/2; U; Warp 4; en-US; rv:1.3) Gecko/20030313

Information contained in a table is not being displayed in browser although it
exists in the source.  I'm looking at a webpage that apparently uses javascript
to sort the rows in a table.  When javascript is enabled for the page none of
the rows appear in the browser window.  However, if you disable javascript the
entire table is shown.  The JavaScript Console reports this error:
"Error: this.Table.rows[this.Table.rows.length - 1].insertAdjacentElement is not
a function
Source File: https://www.merlindata.com/include/SortableTable.CSJSI"

Reproducible: Always

Steps to Reproduce:
The site where I encountered this problem is a subscription site and therefore
could not be reproduced by you without a subscription but all you have to do is
load the page with javascript enabled.

Actual Results:  
Rows in a table were not displayed

Expected Results:  
Rows in a table should have been displayed.
Attachment #118461 - Attachment mime type: application/octet-stream → application/x-javascript
The page uses the insertAdjacentElement function, which appears to be
IE-specific. ->Tech Evang
Assignee: dom_bugs → susiew
Status: UNCONFIRMED → NEW
Component: DOM Level 0 → US General
Ever confirmed: true
Product: Browser → Tech Evangelism
QA Contact: ashishbhatt → zach
Summary: Information contained in a table is not being displayed in browser although it exists in the source. → merlindata.com - Uses insertAdjacentElement function (IE)
Version: Trunk → unspecified
tech evang june 2003 reorg
Assignee: susiew → english-us
QA Contact: zach → english-us
Not Os/2 specific
OS: other → All
Hardware: PC → All
opera, safari, chrome and ie supports this function
and at the w3c its an working-draft:
http://www.w3.org/TR/html5/apis-in-html-documents.html#insertadjacenthtml
(In reply to comment #6)
> opera, safari, chrome and ie supports this function
> and at the w3c its an working-draft:
> http://www.w3.org/TR/html5/apis-in-html-documents.html#insertadjacenthtml

We should morph this bug or else have a new one asking for us to implement insertAdjacentElement. Thomas Fuchs at JSConf notes it is useful on mobile and in IE and WebKit. He did not cite Opera but that pretty much means we should do it, in my view.

/be
We already have bug 613662 on implementing insertAdjecentHTML. I've never heard of insertAdjecent*Element* before, is that a misspelling of insertAdjecentHTML?
No.  insertAdjacentElement is not insertAdjacentHTML.  It's a way of inserting next to something as opposed to a child of something, and is IE-specific.  See http://msdn.microsoft.com/en-us/library/ms536451%28v=vs.85%29.aspx

Comment 6 has nothing to do with this bug.

On the other hand, commen 7 may be relevant here.  I believe WebKit does implement insertAdjacentElement.  So it could be "useful" on mobile in the sense that webkit-only stuff might be using it.  Brendan, you're sure you got the right function name?
I was using insertAdjacentElement in a Phonegap app and was surprised this is not included in Firefox. It's easily polyfill-able but AFAIK it's implemented in every other (major) engine (so developers will forget to add it). I find this method quite handy especially if you are used to writing insertAdjacentHTML/Text (and it reduces code resp. looks cleaner). However, I cannot find any W3 or WHATWG stadards definition (but take a look at the MSDN link). It should work analogous to insertAdjacentHTML. 

Should I add a new bug for implementing this or should this bug be changed? If this lands within a short time, should this be uplifted to make it into B2G (Gecko 17/18)?
ms2ger: Is this something that should be added to DOM Core spec? It seems like if all other browser vendors are implementing it, and that it's genuinely useful (although will a somewhat verbose name) that it should simply be added.
Jonas, ms2ger: see also Bug 811259.
I don't see a particular reason to implement this, given that we've had only one suggestion to add it since 2003. I would suggest implementing the new mutation methods [1] instead (after we move Element to WebIDL, I guess).

[1] http://dom.spec.whatwg.org/#mutation-methods
Hmm. I still think it's a good idea to implement this due to consistency (parity-webkit|parity-ie|parity-presto [1]). Maybe the codebase can be shared with the mutation methods?

[1] http://help.dottoro.com/ljbreokf.php
I agree there doesn't seem to be a huge clamoring for this. Searching google for insertAdjecentElement does indicate that there are many more people that has been missing this function in Firefox though. The top quicksearch suggestion for 'insertAdjecentElement' is 'insertAdjecentElement firefox'.
I believe the site has been updated. Not able to log into the site to know for sure. Closing but please reopen if the bug still exists.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: