web_request_custom_bindings.js 461 B

123456789101112
  1. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. // Custom binding for the webRequest API.
  5. if (!apiBridge) {
  6. var binding = require('binding').Binding.create('webRequest');
  7. var webRequestEvent = require('webRequestEvent').WebRequestEvent;
  8. binding.registerCustomEvent(webRequestEvent);
  9. exports.$set('binding', binding.generate());
  10. }