webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Instance Methods | Protected Attributes | Properties | List of all members
WebFrame Class Reference

#import <WebFrame.h>

Inheritance diagram for WebFrame:
NSObject

Classes

class  WebFramePrivate
 

Instance Methods

(instancetype) - initWithName:webFrameView:webView:
 
(void- loadRequest:
 
(void- loadData:MIMEType:textEncodingName:baseURL:
 
(void- loadHTMLString:baseURL:
 
(void- loadAlternateHTMLString:baseURL:forUnreachableURL:
 
(void- loadArchive:
 
(void- stopLoading
 
(void- reload
 
(void- reloadFromOrigin
 
(WebFrame *) - findFrameNamed:
 
(NSString *) - renderTreeAsExternalRepresentationForPrinting:
 
(int) - numberOfPagesWithPageWidth:pageHeight:
 
(void- printToCGContext:pageWidth:pageHeight:
 

Protected Attributes

package WebFramePrivate_private
 

Properties

NSStringname
 
WebViewwebView
 
WebFrameViewframeView
 
DOMDocumentDOMDocument
 
DOMHTMLElementframeElement
 
WebDataSourcedataSource
 
WebDataSourceprovisionalDataSource
 
WebFrameparentFrame
 
NSArraychildFrames
 
WebScriptObjectwindowObject
 
JSGlobalContextRef globalContext
 

Detailed Description

Every web page is represented by at least one WebFrame. A WebFrame has a WebFrameView and a WebDataSource.

Method Documentation

◆ findFrameNamed:()

- (WebFrame *) findFrameNamed: (NSString *)  name

findFrameNamed: This method returns a frame with the given name. findFrameNamed returns self for _self and _current, the parent frame for _parent and the main frame for _top. findFrameNamed returns self for _parent and _top if the receiver is the mainFrame. findFrameNamed first searches from the current frame to all descending frames then the rest of the frames in the WebView. If still not found, findFrameNamed searches the frames of the other WebViews.

Parameters
nameThe name of the frame to find.
Returns
The frame matching the provided name. nil if the frame is not found.

◆ initWithName:webFrameView:webView:()

- (instancetype) initWithName: (NSString *)  name
webFrameView: (WebFrameView *)  view
webView: (WebView *)  webView 

initWithName:webFrameView:webView: The designated initializer of WebFrame. WebFrames are normally created for you by the WebView. You should not need to invoke this method directly.

Parameters
nameThe name of the frame.
viewThe WebFrameView for the frame.
webViewThe WebView that manages the frame.
Returns
Returns an initialized WebFrame.

◆ loadAlternateHTMLString:baseURL:forUnreachableURL:()

- (void) loadAlternateHTMLString: (NSString *)  string
baseURL: (NSURL *)  baseURL
forUnreachableURL: (NSURL *)  unreachableURL 

loadAlternateHTMLString:baseURL:forUnreachableURL: Loads a page to display as a substitute for a URL that could not be reached. This allows clients to display page-loading errors in the webview itself. This is typically called while processing the WebFrameLoadDelegate method -webView:didFailProvisionalLoadWithError:forFrame: or one of the the WebPolicyDelegate methods -webView:decidePolicyForMIMEType:request:frame:decisionListener: or -webView:unableToImplementPolicyWithError:frame:. If it is called from within one of those three delegate methods then the back/forward list will be maintained appropriately.

Parameters
stringThe string to use for the main page of the document.
baseURLThe baseURL to apply to relative URLs within the document.
unreachableURLThe URL for which this page will serve as alternate content.

◆ loadArchive:()

- (void) loadArchive: (WebArchive *)  archive

loadArchive: Causes WebFrame to load a WebArchive.

Parameters
archiveThe archive to be loaded.

◆ loadData:MIMEType:textEncodingName:baseURL:()

- (void) loadData: (NSData *)  data
MIMEType: (NSString *)  MIMEType
textEncodingName: (NSString *)  encodingName
baseURL: (NSURL *)  URL 

loadData:MIMEType:textEncodingName:baseURL:

Parameters
dataThe data to use for the main page of the document.
MIMETypeThe MIME type of the data.
encodingNameThe encoding of the data.
URLThe base URL to apply to relative URLs within the document.

◆ loadHTMLString:baseURL:()

- (void) loadHTMLString: (NSString *)  string
baseURL: (NSURL *)  URL 

loadHTMLString:baseURL:

Parameters
stringThe string to use for the main page of the document.
URLThe base URL to apply to relative URLs within the document.

◆ loadRequest:()

- (void) loadRequest: (NSURLRequest *)  request

loadRequest:

Parameters
requestThe web request to load.

◆ numberOfPagesWithPageWidth:pageHeight:()

- (int) numberOfPagesWithPageWidth: (float)  pageWidthInPixels
pageHeight: (float)  pageHeightInPixels 

Provided by category WebFrame(WebKitDebug).

◆ printToCGContext:pageWidth:pageHeight:()

- (void) printToCGContext: (CGContextRef cgContext
pageWidth: (float)  pageWidthInPixels
pageHeight: (float)  pageHeightInPixels 

Provided by category WebFrame(WebKitDebug).

◆ reload()

- (HRESULT) reload

reload Performs HTTP/1.1 end-to-end revalidation using cache-validating conditionals if possible.

◆ reloadFromOrigin()

- (HRESULT) reloadFromOrigin

reloadFromOrigin Performs HTTP/1.1 end-to-end reload.

◆ renderTreeAsExternalRepresentationForPrinting:()

- (NSString *) renderTreeAsExternalRepresentationForPrinting: (BOOL forPrinting

Provided by category WebFrame(WebKitDebug).

◆ stopLoading()

- (HRESULT) stopLoading

stopLoading Stop any pending loads on the frame's data source, and its children.

Member Data Documentation

◆ _private

- (package WebFramePrivate*) _private
protected

Property Documentation

◆ childFrames

- (NSArray *) childFrames
readnonatomiccopy

An array of WebFrame. The frames in the array are associated with a frame set or iframe.

◆ dataSource

- (HRESULT) dataSource
readnonatomicstrong

The datasource for this frame. Returns the committed data source. Will return nil if the provisional data source hasn't yet been loaded.

◆ DOMDocument

- (HRESULT) DOMDocument
readnonatomicstrong

The DOM document of the frame. Returns nil if the frame does not contain a DOM document such as a standalone image.

◆ frameElement

- (HRESULT) frameElement
readnonatomicstrong

The frame element of the frame. The class of the result is either DOMHTMLFrameElement, DOMHTMLIFrameElement or DOMHTMLObjectElement. Returns nil if the frame is the main frame since there is no frame element for the frame in this case.

◆ frameView

- (HRESULT) frameView
readnonatomicstrong

The WebFrameView for this frame.

◆ globalContext

- (JSGlobalContextRef) globalContext
readnonatomicassign

The frame's global JavaScript execution context. Use this method to bridge between the WebKit and JavaScriptCore APIs.

◆ name

- (NSString *) name
readnonatomiccopy

The frame name.

◆ parentFrame

- (WebFrame *) parentFrame
readnonatomicstrong

The frame containing this frame, or nil if this is a top level frame.

◆ provisionalDataSource

- (HRESULT) provisionalDataSource
readnonatomicstrong

The provisional datasource of this frame. Will return the provisional data source. The provisional data source will be nil if no data source has been set on the frame, or the data source has successfully transitioned to the committed data source.

◆ webView

- (WebView *) webView
readnonatomicstrong

The WebView for the document that includes this frame.

◆ windowObject

- (WebScriptObject *) windowObject
readnonatomicstrong

The WebScriptObject representing the frame's JavaScript window object.


The documentation for this class was generated from the following files: