• 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
Newbie WebKit Q: Problems when loading an HTML string?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie WebKit Q: Problems when loading an HTML string?


  • Subject: Newbie WebKit Q: Problems when loading an HTML string?
  • From: Ken Tabb <email@hidden>
  • Date: Fri, 28 Oct 2005 14:15:42 +0100

Hi folks,

I have an app that takes a string (of HTML text) and renders it in a WebView, using:

IBOutlet id webView; //hooked up in IB

...

[[webView mainFrame] loadHTMLString:myHTMLString baseURL:someSensibleURL];

... and as you'd expect it works like a charm, shows the rendered HTML on screen etc.

I then need to get at that same mainFrame's -dataSource, yet it returns nil. The page is rendered, it's fully loaded etc. but seemingly has no dataSource. Equally if I try to get its underlying HTML using

NSString *myString = (DOMHTMLElement *)[[[webView mainFrame] DOMDocument] documentElement] outerHTML];

... then that too returns nil.

Is this because I'm specifically loading a string, rather than a file/ URL? And if so, is there any way I can get at the mainFrame's dataSource? Please don't make me go back to writing temp files :(

Thanks in advance for any clues,
Ken


- - - - - - - - - - Dr. Ken Tabb Mac & UNIX Developer - Health & Human Sciences Machine Vision & Neural Network researcher - School of Computer Science University of Hertfordshire, UK http://www.health.herts.ac.uk/ken/

Certified non-Microsoft Solution Provider

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Table view jumps to selection on insertion
  • Next by Date: Re: how start DVD player from cocoa application
  • Previous by thread: Re: Table view jumps to selection on insertion
  • Next by thread: Re : An OutlineView with Finder Editing Behavior
  • Index(es):
    • Date
    • Thread