Mac Developer Library

Developer

WebKit Framework Reference DOMNode Additions Reference

Options
Deployment Target:

On This Page
Language:

DOMNode

Additions to the DOMNode class help convert the structured nodes of DOM content into a rich web-viewable form.

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Swift

import WebKit

Objective-C

@import WebKit;

Availability


Available in OS X v10.3.9 and later.
  • Returns a web archive of the content of the node and its children.

    Declaration

    Swift

    var webArchive: WebArchive! { get }

    Objective-C

    @property(nonatomic, readonly, strong) WebArchive *webArchive

    Return Value

    A web archive of the content of the node and its children.

    Import Statement

    Objective-C

    @import WebKit;

    Swift

    import WebKit

    Availability

    Available in OS X v10.3.9 and later.

  • Returns a rectangle that bounds the onscreen rendering of the node.

    Declaration

    Swift

    func boundingBox() -> NSRect

    Objective-C

    - (NSRect)boundingBox

    Return Value

    The rectangle that represents the bounding box of the onscreen rendering of the node.

    Import Statement

    Objective-C

    @import WebKit;

    Swift

    import WebKit

    Availability

    Available in OS X v10.5 and later.

  • Returns the rectangles that bound each line of text in the node.

    Declaration

    Swift

    func lineBoxRects() -> [AnyObject]!

    Objective-C

    - (NSArray *)lineBoxRects

    Return Value

    An array of rectangles, in which each rectangle represents the bounding box of a line of text in the node.

    Import Statement

    Objective-C

    @import WebKit;

    Swift

    import WebKit

    Availability

    Available in OS X v10.5 and later.