From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from resqmta-ch2-03v.sys.comcast.net (resqmta-ch2-03v.sys.comcast.net [IPv6:2001:558:fe21:29:69:252:207:35]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 6C3F077ABB for ; Tue, 6 Oct 2015 10:39:59 -0700 (PDT) Received: from resomta-ch2-11v.sys.comcast.net ([69.252.207.107]) by resqmta-ch2-03v.sys.comcast.net with comcast id Rtj61r0022Ka2Q501tjbZp; Tue, 06 Oct 2015 17:43:35 +0000 Received: from eklhad ([IPv6:2601:405:4002:b0a:21e:4fff:fec2:a0f1]) by resomta-ch2-11v.sys.comcast.net with comcast id Rtja1r00T0GArqr01tjaLH; Tue, 06 Oct 2015 17:43:35 +0000 To: Edbrowse-dev@lists.the-brannons.com From: Karl Dahlke Reply-to: Karl Dahlke User-Agent: edbrowse/3.5.4.2+ Date: Tue, 06 Oct 2015 13:43:34 -0400 Message-ID: <20150906134334.eklhad@comcast.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1444153415; bh=a1gO3ck4qKOA2Z/QZvZ/S2msteTVZAI9TGAizzr2KV4=; h=Received:Received:To:From:Reply-to:Subject:Date:Message-ID: Mime-Version:Content-Type; b=ZQyzSSAb4w+ibfzJ64tl3Dn5J4ZrlozS7+qhUoGC647cwbqfl8fzuvQYc154mzQcT oRKK8iSeWHTgZT4QQo/M4N3v3f7kp/XPp0qbxQbtxUiBympjc6NOGM0TWjACRDstBf 7GoK6v44DW3nkjAhnSe3DeWzq3wMztp6moVdNRmaTeihVgvDwBPg+etixv/Gl6sVu8 CMbIpzWWqocvlZTjRw7rQe5SubCkufBHUDoFjbUL9qhezP3QAho1nIEB4ONqZJtCJN bqhRHhblVRWSK/bY18nrSUqxC1+FC2hhASGPs/NTVu87tp/9gn/CdTzhk1hR+4afOT pH2lL+Mlffr/g== Subject: [Edbrowse-dev] setAttribute X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 17:39:59 -0000 Question - does the setAttribute() method need to have any side effects? If not, then it need not be native. Here's how I see it. If all js all the time uses setAttribute to change js dom variables that edbrowse would need to know about, then yes it has to have a side effect, to pass the variable assignment back to edbrowse. But if ever js ever sets foo=bar directly, and still this is something edbrowse needs to know about, then edbrowse just has to check at run time, and it's always checking, and since it is checking there is no need for a setAttribute side effect. Perhaps an example would clear up this mess. When you submit a form you jump to the action attribute in the form tag.
All good but if js changes the action to somewhere else form.action="peanutbutter.com"; then that is where submit is suppose to go. This must have happened somewhere, some time, because I programmed for this. At time of submit, if js is active I retrieve the action variable from js and go there, if js is not active then I use the url in the html tag. It's even exercised in jsrt. I'm not relying on setAttribute to tell me that action has changed, I check for it at time of submit. I think in this case, or in some cases, I just have to check the js variables at run time. As I mentioned above, if I have to check variables at run time then I'm going to check them, and there's no real advantage of getting a heads up from setAttribute. Well these are just the thoughts running around my head today. Karl Dahlke