Mac Developer Library

Developer

WebKit Framework Reference DOMElement Additions Reference

Options
Deployment Target:

On This Page
Language:

DOMElement

Additions to the DOMElement class to retrieve the image of DOMHTMLImageElement objects.

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


import WebKit @import WebKit;

Availability


Available in OS X v10.5 and later.
  • Returns an image associated with the receiver.

    Declaration

    Swift

    func image() -> NSImage!

    Objective-C

    - (NSImage *)image

    Discussion

    Returns an NSImage for the receiver if it is a DOMHTMLImageElement object—a DOMHTMLObjectElement object with an image loaded or a DOMHTMLInputElement object of type image. Returns nil if there is an error loading the image or the element does not contain an image.

    Import Statement

    import WebKit

    Availability

    Available in OS X v10.5 and later.