Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'that?': 0.05; '21,': 0.07; 'append': 0.07; '(it': 0.09; 'cases': 0.15; 'dec': 0.15; 'element.': 0.16; 'nodes': 0.16; 'wrote:': 0.17; 'basically': 0.17; 'element': 0.17; 'thanks,': 0.18; 'doc': 0.22; 'header:In-Reply-To:1': 0.25; 'looks': 0.26; 'message- id:@mail.gmail.com': 0.27; 'dom': 0.29; 'node': 0.29; 'obj': 0.29; 'represented': 0.29; 'class': 0.29; 'usually': 0.30; 'attach': 0.30; 'fri,': 0.30; 'expect': 0.31; 'code': 0.31; 'anywhere': 0.33; 'to:addr:python-list': 0.33; 'another': 0.33; 'received:google.com': 0.34; 'adds': 0.35; 'doing': 0.35; 'pm,': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'explain': 0.36; 'but': 0.36; 'child': 0.36; 'depends': 0.36; 'itself': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'several': 0.39; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'to:name:python': 0.84; 'tree,': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=SQJehYfCEQb85SFQh0qEVsuVieKlHp/j6bbrxJrlZN4=; b=Z2y8kUPodRkE8e8xL3ifemI6QN1smkKL4wBgWssBBYpYRTPq38Z9pvekJUg5QEOWhs 9Z9s4uFlJxsIUKl25e2Q231lrk1KI6hz+nEdueRIwvCAlSw4HAZz98oEI9fbBn6xJOny x0uLdB9EZyLWmCDzHRHeM6oSHIGfCco0oBfuDEbCrp5FZQkk/l9SQKYEg74bl+dKLHrH k6cY+Nc6cDwOtNGEmfXqUcH92Pyz6vJ/+zA4nA1OwNTrBfN7ejXjnWmRuc2t9d43Ty2M Spv3D8jabQdWiHzxsAqyD1v8D/uuvRbH7pJ0nlKjHP+dtxoSE0qIhcAG4Y+EmiSLQ0je whUg== MIME-Version: 1.0 In-Reply-To: <71f75508-603b-4f04-ac1b-d039fbba1085@googlegroups.com> References: <9122ba06-bc02-42a3-84a6-568c3fab4598@googlegroups.com> <71f75508-603b-4f04-ac1b-d039fbba1085@googlegroups.com> From: Ian Kelly Date: Fri, 21 Dec 2012 14:17:57 -0700 Subject: Re: Brython - Python in the browser To: Python Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1356124710 news.xs4all.nl 6904 [2001:888:2000:d::a6]:60141 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:35319 On Fri, Dec 21, 2012 at 1:59 PM, Pierre Quentel wrote: >> By the way, what is Brython actually doing when you append a child to >> the document itself like that? Usually I would expect a div to be >> appended to the body or to another div. The above looks like it would >> attach the new div as a sibling of the html element. Or is it just >> calling document.write()? > > dom_elt <=3D obj actually adds one or several DOM nodes (it depends of th= e class of obj) to the DOM node represented by dom_elt. It's difficult to e= xplain all the cases here, you would have to take a look at the code in py_= dom.js, but <=3D and + work on the DOM tree, there is no document.write any= where Thanks, I found my answer in the source: doc <=3D element basically calls document.body.appendChild(element)