Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #29082
| Path | csiph.com!news.mixmin.net!aioe.org!.POSTED!not-for-mail |
|---|---|
| From | Joao Rodrigues <groups_jr-1@yahoo.com.br> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: references to DOM parts |
| Date | Thu, 31 Dec 2015 21:23:56 -0200 |
| Organization | Aioe.org NNTP Server |
| Lines | 56 |
| Message-ID | <n64dee$4ku$1@speranza.aioe.org> (permalink) |
| References | <DOM-20151230191146@ram.dialup.fu-berlin.de> <1etso5kfd39eq$.19v3fhasifklp$.dlg@40tude.net> <XnsA58171C47E6C6eejj99@194.109.6.166> <ujxqdr50bbzz.hihpzuog4tj6.dlg@40tude.net> <n63lbk$kss$1@dont-email.me> <XnsA581C4A8C44BAeejj99@194.109.6.166> <n63snt$nrq$1@dont-email.me> |
| NNTP-Posting-Host | 5oq0M7qGeWhU/PcHEWLGrQ.user.speranza.aioe.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Complaints-To | abuse@aioe.org |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 |
| X-Notice | Filtered by postfilter v. 0.8.2 |
| Xref | csiph.com comp.lang.javascript:29082 |
Show key headers only | View raw
On 12/31/2015 04:41 PM, Aleksandro wrote:
> On 31/12/15 15:19, Evertjan. wrote:
>> Aleksandro <aleksandro@gmx.com> wrote on 31 Dec 2015 in
>> comp.lang.javascript:
>>
>>> On 31/12/15 11:15, JJ wrote:
>>>> On Thu, 31 Dec 2015 11:11:01 +0100, Evertjan. wrote:
>>>>>
>>>>> Would the "var m" assignment not prevent it
>>>>> from being a real orphan [in the sense of gabage-collectable]?
>>>>>
>>>>> ... as it can be reassigned anywhere in the DOM-tree later?
>>>>
>>>> Yes to both.
>>>>
>>>> It's like assigning a variable to the return value of removeChild() then
>>>> re-insert the node into the document later using appendChild() or
>>>> insertBefore(). Without saving a reference to the removed node, the node
>>>> would be a garbage.
>>>
>>> I think would apply the same rules as to any Javascript object.
>>
>> Is the Javascript-object garbage-collection the same as the DOM-tree-element
>> one?
>
> DOM elements are normal Javascript objects, or should be. Someone
> confirm please.
>
DOM objects are host objects (called exotic objects in ES6), not
ECMAScript's ordinary or standard built-in objects. The W3C defined the
DOM as a set of objects and interfaces for accessing and manipulating
document objects in a language-independent manner. The DOM presents
documents as a hierarchy of Node objects that also implement other, more
specialized interfaces.
If I write the following lines in my Chrome 47 (Linux Mint) console, I
will find the "HTMLParagraphElement" object.
var el = document.createElement('p');
console.log(el.constructor.prototype); // logs HTMLParagraphElement
And if I follow the prototype chain, I will find other object names that
correspond to DOM Level 4 interfaces:
HTMLParagraphElement
HTMLElement
Element
Node
EventTarget
Object
BTW, Happy New Year!
--
Joao Rodrigues
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: references to DOM parts JJ <jj4public@vfemail.net> - 2015-12-31 11:47 +0700
Re: references to DOM parts "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-12-31 11:11 +0100
Re: references to DOM parts JJ <jj4public@vfemail.net> - 2015-12-31 21:15 +0700
Re: references to DOM parts Aleksandro <aleksandro@gmx.com> - 2015-12-31 13:35 -0300
Re: references to DOM parts "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-12-31 19:19 +0100
Re: references to DOM parts Aleksandro <aleksandro@gmx.com> - 2015-12-31 15:41 -0300
Re: references to DOM parts Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-12-31 21:23 -0200
Re: references to DOM parts JJ <jj4public@vfemail.net> - 2016-01-01 06:54 +0700
Re: references to DOM parts Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-01 03:36 +0100
Re: references to DOM parts Andrew Poulos <ap_prog@hotmail.com> - 2016-01-01 17:30 +1100
Re: references to DOM parts Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-01 10:31 +0100
Re: references to DOM parts "J.R." <groups_jr-1@yahoo.com.br> - 2016-01-03 00:37 -0800
Re: references to DOM parts Andrew Poulos <ap_prog@hotmail.com> - 2016-01-03 20:10 +1100
Re: references to DOM parts Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2016-01-03 03:32 -0800
Re: references to DOM parts Mark - <nonemail@spamspamapam.net> - 2016-01-03 14:36 +0000
Re: references to DOM parts Aleksandro <aleksandro@gmx.com> - 2016-01-03 16:55 -0300
Re: references to DOM parts Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-03 23:47 +0100
Re: references to DOM parts Aleksandro <aleksandro@gmx.com> - 2016-01-03 20:51 -0300
Re: references to DOM parts Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-04 02:42 +0100
Re: references to DOM parts Aleksandro <aleksandro@gmx.com> - 2016-01-03 23:13 -0300
Re: references to DOM parts Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2016-01-04 09:07 -0200
Re: references to DOM parts Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-04 22:17 +0100
Re: references to DOM parts Stefan Weiss <krewecherl@gmail.com> - 2016-01-05 15:36 +0100
Re: references to DOM parts "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-01-05 16:19 +0100
Re: references to DOM parts Tim Streater <timstreater@greenbee.net> - 2016-01-05 18:09 +0000
Re: references to DOM parts "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-01-05 20:13 +0100
Re: references to DOM parts Stefan Weiss <krewecherl@gmail.com> - 2016-01-07 14:02 +0100
Re: references to DOM parts "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-01-07 16:50 +0100
Re: references to DOM parts Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-07 18:41 +0100
Re: references to DOM parts John Harris <niam@jghnorth.org.uk.invalid> - 2016-01-07 18:12 +0000
Re: references to DOM parts Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-07 20:18 +0100
Re: references to DOM parts Aleksandro <aleksandro@gmx.com> - 2016-01-07 18:22 -0300
Re: references to DOM parts John Harris <niam@jghnorth.org.uk.invalid> - 2016-01-08 10:08 +0000
Re: references to DOM parts Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2016-01-07 18:03 -0800
Re: references to DOM parts Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-01-04 21:00 +0000
Re: references to DOM parts "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-01-04 16:45 -0800
Re: references to DOM parts Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-01 03:32 +0100
Re: references to DOM parts Aleksandro <aleksandro@gmx.com> - 2016-01-01 02:56 -0300
Re: references to DOM parts Luuk <luuk@invalid.lan> - 2016-01-03 16:56 +0100
Re: references to DOM parts Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-03 17:25 +0100
Re: references to DOM parts Luuk <luuk@invalid.lan> - 2016-01-03 18:19 +0100
Re: references to DOM parts Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-03 23:23 +0100
Re: references to DOM parts Tim Streater <timstreater@greenbee.net> - 2016-01-03 22:28 +0000
Re: references to DOM parts Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2016-01-04 09:09 -0200
csiph-web