-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi-client.html
More file actions
35 lines (28 loc) · 1.11 KB
/
api-client.html
File metadata and controls
35 lines (28 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<link rel="import" href="../iron-ajax/iron-ajax.html">
<link rel="import" href="api-client-config-behavior.html">
<link rel="import" href="api-client-behavior.html">
<link rel="import" href="api-client-request-behavior.html">
<dom-module id="apigility-client">
<template>
<iron-ajax id="ironAjax" content-type="{{contentType}}" loading="{{loading}}"></iron-ajax>
<content></content>
</template>
<script>
'use strict';
Polymer({
is: 'apigility-client',
behaviors: [
PolymerApigility.ApiClientBehavior,
PolymerApigility.ApiClientConfigBehavior,
PolymerApigility.ApiClientRequestBehavior
],
ready: function () {
this.$.ironAjax.addEventListener('response', this.attachIronAjaxListener.bind(this));
this.$.ironAjax.addEventListener('error', this.attachIronAjaxListener.bind(this));
},
attachIronAjaxListener : function (event) {
event.detail.ironAjax = this.$.ironAjax;
}
});
</script>
</dom-module>