summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/tools/pywebsocket/src/example/util_worker.js
blob: b64f7829d52d850649889f9b0ace9985c7b6211e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright 2014 Google Inc. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the COPYING file or at
// https://developers.google.com/open-source/licenses/bsd

// Utilities for example applications (for the worker threads only).

function workerAddToLog(text) {
  postMessage({type: 'addToLog', data: text});
}

function workerAddToSummary(text) {
  postMessage({type: 'addToSummary', data: text});
}

function workerMeasureValue(value) {
  postMessage({type: 'measureValue', data: value});
}