Safari Developer Library

Developer

SafariNamespace Class Reference

Options
Deployment Target:

On This Page

SafariNamespace

Inheritance


  • SafariNamespace

Conforms To


Not Applicable

Import Statement


Not Applicable Not Applicable

Availability


Available in Safari 5.0 and later.

The SafariNamespace class is a namespace that provides access to the Safari Extensions functionality outside of the web content area.

The corresponding class, SafariContentNamespace, is used from inside a web content area.

  • application Property

    The Safari application.

    Declaration

    JavaScript

    readonly attribute SafariApplication application

    Availability

    Available in Safari 5.0 and later.

  • extension Property

    The current Safari extension.

    Declaration

    JavaScript

    readonly attribute SafariExtension extension

    Availability

    Available in Safari 5.0 and later.

  • self Property

    The SafariExtensionGlobalPage or SafariExtensionBar object that owns the DOM window that this instance of the SafariNamespace class was accessed from.

    Declaration

    JavaScript

    readonly attribute any self

    Discussion

    For example, the following is always true:

    • window.safari.self.contentWindow === window;

    Availability

    Available in Safari 5.0 and later.