Skip to content

Commit

Permalink
Update content/loader to use new events API.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gozala committed Feb 8, 2012
1 parent e403f54 commit e4ea047
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/api-utils/lib/content/loader.js
Expand Up @@ -7,6 +7,7 @@
"use strict";

const { EventEmitter } = require('../events');
const { emit } = require('../event/core');
const { validateOptions, getTypeOf } = require('../api-utils');
const { URL } = require('../url');
const file = require('../file');
Expand Down Expand Up @@ -105,7 +106,7 @@ const Loader = EventEmitter.compose({
set contentURL(value) {
value = validate(value, valid.contentURL);
if (this._contentURL != value) {
this._emit('propertyChange', {
emit(this._public, 'propertyChange', {
contentURL: this._contentURL = value
});
}
Expand All @@ -126,7 +127,7 @@ const Loader = EventEmitter.compose({
set contentScriptWhen(value) {
value = validate(value, valid.contentScriptWhen);
if (value !== this._contentScriptWhen) {
this._emit('propertyChange', {
emit(this._public, 'propertyChange', {
contentScriptWhen: this._contentScriptWhen = value
});
}
Expand All @@ -142,7 +143,7 @@ const Loader = EventEmitter.compose({
set contentScriptFile(value) {
value = validate(value, valid.contentScriptFile);
if (value != this._contentScriptFile) {
this._emit('propertyChange', {
emit(this._public, 'propertyChange', {
contentScriptFile: this._contentScriptFile = value
});
}
Expand All @@ -158,7 +159,7 @@ const Loader = EventEmitter.compose({
set contentScript(value) {
value = validate(value, valid.contentScript);
if (value != this._contentScript) {
this._emit('propertyChange', {
emit(this._public, 'propertyChange', {
contentScript: this._contentScript = value
});
}
Expand Down

0 comments on commit e4ea047

Please sign in to comment.