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.

  • 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.

    Availability

    Available in OS X v10.5 and later.