Skip to content

Instantly share code, notes, and snippets.

@vbravest
vbravest / library-promise.js
Last active March 31, 2017 22:43
Illustrates loading external JS libraries via promise
/**
* Illustrates loading external JS libraries via promise
*/
class GoogleApiService {
static promise = null;
baseUrl = '';
constructor(baseUrl) {
this.baseUrl = baseUrl;
// Tag A
<script>
! function(f, b, e, v, n, t, s) {
   if (f.fbq) return;
   n = f.fbq = function() {
       n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments)
   };
   if (!f._fbq) f._fbq = n;
   n.push = n;
{
"adjoining-classes": true,
"box-model": true,
"box-sizing": false,
"bulletproof-font-face": true,
"compatible-vendor-prefixes": true,
"display-property-grouping": true,
"duplicate-background-images": false,
"duplicate-properties": true,
"empty-rules": true,