Re: Intercepting JavaScript calls in WebViews
Re: Intercepting JavaScript calls in WebViews
- Subject: Re: Intercepting JavaScript calls in WebViews
- From: KLW <email@hidden>
- Date: Mon, 05 Jan 2004 10:40:15 -0500
Patrick Machielse wrote:
[snip]
> This is quite 'easy' and does what it is supposed to, but won't work
if the
user clicks on a 'javascript' link before loading of the page is complete
and the controler hasn't replaced the js calls yet.
I also tried replacing the js code while the html is retreived, but then you
have to register a URLProtocol for the html scheme. The problem here is that
you want to build on "NSHTMLProtocol", but you can't since it is private.
There may be a way around this, but I didn't investigate any further.
[/snip]
I'm probably missing something obvious, but why can't you load the
response to the get request into some kind of buffer or storage
container before throwing it into an NSTextView? Pop all the HTML into a
buffer, do whatever operations you need, and THEN display it. Also would
save the extra processing involved in displaying the content twice.
Forgive me if I'm speaking out of my gourd on this one.
KLW
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.