Safari Reference Library Apple Developer
Search

SafariExtensionSettingsChangeEvent Class Reference

Inherits from
Technology area
Safari Extensions
Availability
Available in Safari 5.0 and later.

Overview

Instances of the SafariExtensionsSettingsChangeEvent class are used to provide a description of a change made to the extension’s settings. A settings change event is sent when your extension changes a setting as well as when a setting is changed outside your extension (for example, a setting changed in the Safari preferences).

These events do not bubble; their target is the settings or secure settings object that changed.

The event type for this class is change.

Note: Take special care to leave the settings unchanged while handling to a settings-change event. Otherwise you can create an infinite loop, in which each settings-change event triggers another settings-change event.

Tasks

Getting Information About Changes to Settings

Properties

key

The key identifier of the setting that was changed.

readonly attribute DOMString key
Discussion

If all of the settings have been removed, this value is null.

Availability

newValue

The value after the settings change.

readonly attribute any newValue
Discussion

If the key was removed or all settings have been removed, this value is null.

Availability

oldValue

The value before the settings change.

readonly attribute any oldValue
Discussion

If the key was added or all settings have been removed, this value is null.

Availability



Last updated: 2010-07-13

Did this document help you? Yes It's good, but... Not helpful...