Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: Is there such a thing as AppendSibling? Date: Wed, 27 Apr 2016 21:33:50 +0200 Organization: PointedEars Software (PES) Lines: 46 Message-ID: <2981827.leRlmMJCvi@PointedEars.de> References: <2507561.Om0TlvYDvz@PointedEars.de> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1461785631 28867 eJwNwgERwDAIA0BLBRK6yBmM+pfQ3T8jLXsjmeD5zZky1Msn0a76uNHKKLXB23xJszxmwlS8IXQQ0w== (27 Apr 2016 19:33:51 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Wed, 27 Apr 2016 19:33:51 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwFwQEBADAEBMBKZjziYPSPsDu9OGgTKERXd8Er9STlAERbE0FupVybjZryodqXwa6XQuI2pTXZ+EvhD2aiFfA= Cancel-Lock: sha1:EbEjWfQGmk52SV1xLTRfqXJhuXs= X-NNTP-Posting-Host: eJwFwYEBACAEBMCV0L8yjsj+I3TH5eq14XRwOKiHHJ6VlhrY3hNxz1Tz0NUEz+RSdJVCOz8dMhDH Xref: csiph.com comp.lang.javascript:30372 Cezary Tomczyk wrote: > On 26/04/2016 16:49, Thomas 'PointedEars' Lahn wrote: >> JJ wrote: >>> On Tue, 26 Apr 2016 09:01:13 +0200, Jake Jarvis wrote: >>>> Am 26.04.2016 um 08:09 schrieb bit-naughty@hotmail.com: >>>>> I know about AppendChild, but if I say, have a
and I want >>>>> another
*next* to it to appear when a particular button is >>>>> clicked - i.e. _it's at the same level in the DOM tree_ !!! , then >>>>> what do I do? Thanks. >>>> Go up one level to the parent element and use the >>>> insertBefore(newChild, refChild) method. >>> Or insertAdjacentHTML(). Whichever is applicable. >> insertAdjacentHTML() is proprietary, inefficient, and error-prone; and it >> is obsolete since IE/MSHTML 5. > > Based on: > > * > https://w3c.github.io/DOM-Parsing/#widl-Element-insertAdjacentHTML-void-DOMString-position-DOMString-text Proprietary, only specified there because the vendors of the browsers whose representatives command the WHATWG, for some weird reason thought it would be a pretty neat idea to start supporting obsolete IE/MSHTML features. Surprisingly, and unfortunately, that included Mozilla which, at some point in time after they went commercial, started to support “document.all” when “document.all” was already obsolete in MSHTML thanks to introducing W3C DOM support. > * https://msdn.microsoft.com/en-us/library/ms536452%28v=vs.85%29.aspx AISB. “There are no standards that apply here.” > https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentHTML AISB. > I don't think so it's obsolete. You are mistaken. -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not cc me. / Bitte keine Kopien per E-Mail.