• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Intercepting JavaScript calls in WebViews
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Intercepting JavaScript calls in WebViews
      • From: Patrick Machielse <email@hidden>
References: 
 >Re: Intercepting JavaScript calls in WebViews (From: Patrick Machielse <email@hidden>)

  • Prev by Date: Re: Security opinion needed
  • Next by Date: Re: Find app's working directory
  • Previous by thread: Re: Intercepting JavaScript calls in WebViews
  • Next by thread: Re: Intercepting JavaScript calls in WebViews
  • Index(es):
    • Date
    • Thread