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.

  • A web archive of the content of the node and its children. (read-only)

    Declaration

    Swift

    var webArchive: WebArchive! { get }

    Objective-C

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

    Availability

    Available in OS X v10.3 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.

    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.

    Availability

    Available in OS X v10.5 and later.