 
 $ = (id) -> document.getElementById id
 bgExclusions = chrome.extension.getBackgroundPage().Exclusions
-restoreSettingsVersion = null
 
 # We have to use Settings from the background page here (not Settings, directly) to avoid a race condition for
 # the page popup.  Specifically, we must ensure that the settings have been updated on the background page

            option.populateElement backup[option.field]
            option.onUpdated()

# Exported for tests.
root = exports ? window
extend root, {Options, isVimiumOptionsPage: true}

    bgSettings.clear @field
    @fetch()

  @onSaveCallbacks: []
  @onSave: (callback) ->
    @onSaveCallbacks.push callback

  # Static method.
  @saveOptions: ->
    Option.all.map (option) -> option.save()
    callback() for callback in @onSaveCallbacks

  # Abstract method; only implemented in sub-classes.
  # Populate the option's DOM element (@element) with the setting's current value.
