[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Konqueror plugins
From:       Matt Koss <koss () miesto ! sk>
Date:       1999-11-23 12:28:15
[Download RAW message or body]

On Ne, 21 nov 1999, Lars Knoll wrote:
>On Sun, 21 Nov 1999, Matt Koss wrote:
>> Exactly.
>> This would only display the list of the url's in the same konqueror window, and
>> when user presses "Back", he would be back on the page.
>> 
>> Now I got another idea. Wouldn't be better to integrate this into khtml ?
>> The rendered page would contain some special link on some default location and
>> following this link would display the page with only links.
>> 
>> Lynx browser does something similar, but it displays the link at the bottom of
>> the displayed page.
>> Konqy would display only some small sign / link.
>> 
>> Lars, Waldo, what ya think ?
>
>No. I don't think thats a job for khtml. But using the DOM, there's an
>easy way to implement this feature: If you have the KHTMLWidget displaying
>a web page, you can do the following:
>
>	HTMLDocument doc = htmlwidget->htmlDocument();
>	HTMLCollection links = doc.links();
>
>Then just go through the links:
>
>	int i = 0;
>	while(i<links.length())
>	{
>		Node item = links(i);
>		... process them
>		i++;
>	}
>
>At the moment, there's one think missing in the DOM, and that's to be able
>to cast the Node to an HTMLAnchorElement, but I'll try adding the code for
>that this evening.
>
>The above code could then look like:
>
>	while(i<links.length())
>	{
>		HTMLAnchorElement anchor = links(i++);
>		if(anchor.isNull())
>		{
>		   printf("DOM error, links(%d) is not an anchor\n",i);
>		   continue;
>		}
>		DOMString url = anchor.href();
>		// now build up a small html page from the anchor
>	}
> 

Fine with me.
Integration with khtml was just a thought, using plugin for this is a better
way I guess.


	Regards

			Matt

-- 
Matej Koss	e-mail: koss@miesto.sk
Kosice		 ICQ# : 19344305
Slovakia

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic