Index: lib/child/contentPolicy.js |
=================================================================== |
--- a/lib/child/contentPolicy.js |
+++ b/lib/child/contentPolicy.js |
@@ -99,47 +99,47 @@ function processPolicyResponse(window, n |
return allow; |
} |
/** |
* Checks whether a request should be allowed, hides it if necessary |
* @param {nsIDOMWindow} window |
* @param {nsIDOMElement} node |
* @param {String} contentType |
- * @param {String} location |
+ * @param {String} location location of the request, filter key if contentType is ELEMHIDE |
* @return {Boolean} false if the request should be blocked |
*/ |
-function shouldAllow(window, node, contentType, location) |
+let shouldAllow = exports.shouldAllow = function(window, node, contentType, location) |
{ |
return processPolicyResponse(window, node, sendSyncMessage("AdblockPlus:ShouldAllow", { |
contentType, |
location, |
frames: getFrames(window), |
isPrivate: isPrivate(window) |
})); |
-} |
+}; |
/** |
* Asynchronously checks whether a request should be allowed. |
* @param {nsIDOMWindow} window |
* @param {nsIDOMElement} node |
* @param {String} contentType |
- * @param {String} location |
+ * @param {String} location location of the request, filter key if contentType is ELEMHIDE |
* @param {Function} callback callback to be called with a boolean value, if |
* false the request should be blocked |
*/ |
-function shouldAllowAsync(window, node, contentType, location, callback) |
+let shouldAllowAsync = exports.shouldAllowAsync = function(window, node, contentType, location, callback) |
{ |
sendAsyncMessage("AdblockPlus:ShouldAllow", { |
contentType, |
location, |
frames: getFrames(window), |
isPrivate: isPrivate(window) |
}, response => callback(processPolicyResponse(window, node, response))); |
-} |
+}; |
/** |
* Actual nsIContentPolicy and nsIChannelEventSink implementation |
* @class |
*/ |
var PolicyImplementation = |
{ |
classDescription: "Adblock Plus content policy", |