edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] showscripts() (fwd)
@ 2018-02-08  5:21 Kevin Carhart
  2018-02-08  5:38 ` Karl Dahlke
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Carhart @ 2018-02-08  5:21 UTC (permalink / raw)
  To: Edbrowse-dev



I'm going back a few days to ask about showscripts(1).  Hooray for the 
recent explosion of functionality - feels like longer than a few days, 
doesn't it?

> The resulting list is left in document.scripts2,

So the indexes need not correspond, but document.scripts2 is a superset 
that includes all of document.scripts and more, correct?  So it seems 
like there would be no drawback to just always using scripts2 from 
now on.  I don't rely on those indices staying the same anyway, since 
the website developers can move things around at any time.

thanks
Kevin


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Edbrowse-dev] showscripts() (fwd)
  2018-02-08  5:21 [Edbrowse-dev] showscripts() (fwd) Kevin Carhart
@ 2018-02-08  5:38 ` Karl Dahlke
  2018-02-08  6:04   ` Kevin Carhart
  0 siblings, 1 reply; 3+ messages in thread
From: Karl Dahlke @ 2018-02-08  5:38 UTC (permalink / raw)
  To: Edbrowse-dev

[-- Attachment #1: Type: text/plain, Size: 1290 bytes --]

> document.scripts2 is a superset
> that includes all of document.scripts and more, correct?

I think so. In theory javascript could delete a script object that was originally there from html,
though not sure why it would ever want to do that.

Are you saying showscripts() should just act this way all the time, regardless of argument?
I'm ok with that, it's just for developers, not end users, so we don't have to have a big pow-wow about it, if you think so then I'll make the change.
And I might put the list of scripts in $ss, or just anything that's easier to type than document.scripts2.

You're really following the industry trend.
At the dawn of javascript we had all these arrays in document, scripts for the <script>, paragraphs for the <p>, anchors for the <a>,
and you could spin down the array and see them all,
then js started building pages dynamically, and those arrays only capture the html objects,
so they became almost useless, and now code uses getElementsByTagName to gather a runtime array of all the scripts or anchors or whatever that are present in the document,
and that's what the second incarnation of showscripts() does, so we're just following what others are doing.
Someday all those arrays under document may be deprecated.

Karl Dahlke

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Edbrowse-dev] showscripts() (fwd)
  2018-02-08  5:38 ` Karl Dahlke
@ 2018-02-08  6:04   ` Kevin Carhart
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Carhart @ 2018-02-08  6:04 UTC (permalink / raw)
  To: Edbrowse-dev



  >
> Are you saying showscripts() should just act this way all the time, regardless of argument?

I'm happy either way.  Short aliases are good.  I like the $ convention.
I have recently begun to make better use of .ebrc scripting, so there are 
ways of saving some typing when we need to approach the same site over and 
over iteratively, raise the bug, try something, come in again..

thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-08  6:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-08  5:21 [Edbrowse-dev] showscripts() (fwd) Kevin Carhart
2018-02-08  5:38 ` Karl Dahlke
2018-02-08  6:04   ` Kevin Carhart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).