Sha256: 169f37b841a7499d58d2dcb487dc5a07b57cd7313709d52e33b39eed0bfa1c14

Contents?: true

Size: 450 Bytes

Versions: 3

Compression:

Stored size: 450 Bytes

Contents

;(function() {
  'use strict';

  function EventCaptureClient(serverUrl) {
    this.serverUrl = serverUrl;
  }

  EventCaptureClient.prototype.log = function(options) {
    var data = {
      kind: options.kind,
      payload: options.payload,
      emittedAt: (new Date()).toISOString()
    };

    return $.ajax({
      type: 'POST',
      url: this.serverUrl,
      data: data
    });
  };

  window.EventCaptureClient = EventCaptureClient;
})();

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
event_capture-0.2.0.beta1 app/assets/javascripts/event_capture/client.js
event_capture-0.1.1 app/assets/javascripts/event_capture/client.js
event_capture-0.1.2 app/assets/javascripts/event_capture/client.js