Sha256: be8e6594bcddf959fab1de6b32b8efc8df78c787a7c7388ba0c112af01f0ca14

Contents?: true

Size: 1.02 KB

Versions: 8

Compression:

Stored size: 1.02 KB

Contents

// Copyright 2010 The Closure Library Authors. All Rights Reserved.

// Use of this source code is governed by the Apache License, Version 2.0.
// See the COPYING file for details.

/**
 * @fileoverview A web worker for integration testing the PortChannel class.
 *
 * @nocompile
 */

self.CLOSURE_BASE_PATH = '../../';
importScripts('../../bootstrap/webworkers.js');
importScripts('../../base.js');

// The provide is necessary to stop the jscompiler from thinking this is an
// entry point and adding it into the manifest incorrectly.
goog.provide('goog.messaging.testdata.portchannel_worker');
goog.require('goog.messaging.PortChannel');

function registerPing(channel) {
  channel.registerService('ping', function(msg) {
    channel.send('pong', msg);
  }, true);
}

function startListening() {
  var channel = new goog.messaging.PortChannel(self);
  registerPing(channel);

  channel.registerService('addPort', function(port) {
    port.start();
    registerPing(new goog.messaging.PortChannel(port));
  }, true);
}

startListening();

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
k4compiler-0.0.1 third_party/closure-library/closure/goog/messaging/testdata/portchannel_worker.js
middleman-wizard-template-1.0.4 lib/middleman-wizard-template/template/closure/library/closure/goog/messaging/testdata/portchannel_worker.js
middleman-wizard-template-1.0.3 lib/middleman-wizard-template/template/closure/library/closure/goog/messaging/testdata/portchannel_worker.js
middleman-wizard-template-1.0.2 lib/middleman-wizard-template/template/closure/library/closure/goog/messaging/testdata/portchannel_worker.js
middleman-wizard-template-1.0.1 lib/middleman-wizard-template/template/closure/library/closure/goog/messaging/testdata/portchannel_worker.js
middleman-wizard-template-1.0.0.pre.1 lib/middleman-wizard-template/template/closure/library/closure/goog/messaging/testdata/portchannel_worker.js
closure-1.2.701 closure-library/closure/goog/messaging/testdata/portchannel_worker.js
closure-1.1.692 closure-library/closure/goog/messaging/testdata/portchannel_worker.js