edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] Fragments
@ 2015-09-14 23:04 Tyler Spivey
  2015-09-15  5:23 ` Karl Dahlke
  0 siblings, 1 reply; 2+ messages in thread
From: Tyler Spivey @ 2015-09-14 23:04 UTC (permalink / raw)
  To: edbrowse-dev

Here we go.
If I browse this page,
https://forums.spacebattles.com/threads/worm-more-than-meets-the-eye-worm-transformers.317017/threadmarks
and select one of the threadmarks,
for example 1.1,
I get lead here:
https://forums.spacebattles.com/threads/worm-more-than-meets-the-eye-worm-transformers.317017/#post-15620810

Once there, I get:
label post-15620810 is not found

But in the source, we have:
<li id="post-15620810" class="message
hasThreadmark" data-author="Metallix666">

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

* [Edbrowse-dev]  Fragments
  2015-09-14 23:04 [Edbrowse-dev] Fragments Tyler Spivey
@ 2015-09-15  5:23 ` Karl Dahlke
  0 siblings, 0 replies; 2+ messages in thread
From: Karl Dahlke @ 2015-09-15  5:23 UTC (permalink / raw)
  To: edbrowse-dev

> edbrowse not jumping to #foo, despite <li id=foo>

There's a history here.
Long long ago, the places you could jump to were all
<a name=foo>
A named anchor.
But html and js evolved,
and you could jump to any tag that had its id attribute set.
I implemented this for the most part in the old system,
but I don't yet retain these id tags in the buffer in the new system.
In other words, I haven't got round to it yet.

As a proof of concept, I implemented the <li id=foo> tag.
It is now present in the rendered buffer, so you can jump to it.
I ran your example and it works now.
But I only did it for <li>.
I didn't do it for other tags.
If the next page expects you to jump to #bar, and it has
<div id=bar> that still won't work.
So why didn't I do all the tags, or at least the primary set?
Because I like to take small incremental steps.
Because I wanted to fix tyler's bug quickly, so he can find the next one.
And because <li> is unique among the tags and requires special code anyways.

Really? What's so special about <li>?

Consider a list where each item is a paragraph.
I use to write it like this.

<P><LI>apple
<P><LI>banana
<P><LI>cherry

I wrote it that way because it works with edbrowse,
and my sighted friends say it works with other browsers,
so I thought all was well,
but now that tidy is checking up on me I know this is wrong,
and I'm sure other web developers do it the right way, like this.

<LI><P>apple
<LI><P>banana
<LI><P>cherry

If I render serially, as you would expect, it looks like this.

1.

apple
2.

banana
3.

cherry

The number then the paragraph break then the item.
(Indeed the old system would do this.)
So, what you're suppose to do is just remember that a list item is pending,
and on the next occurence of some text, print out the number or the star
or whatever and then the text.
The rendering action of <li> is delayed.
So I also delay, along with the number, the tag indicator of where to jump,
so you indeed wind up on the paragraph of the list item.

I hope all that was somewhat entertaining.

I'll bring in more tags with id set over the next couple days,
particularly <div>, since that is use the most.
<div id=navigation>

Karl Dahlke

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

end of thread, other threads:[~2015-09-15  5:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-14 23:04 [Edbrowse-dev] Fragments Tyler Spivey
2015-09-15  5:23 ` Karl Dahlke

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).