From a862dc5717295d1141bfa570761e534c4a2c2722 Mon Sep 17 00:00:00 2001 From: Jeff Posnick Date: Tue, 30 Jun 2015 13:42:30 -0400 Subject: [PATCH] console.log a message if there is an incorrect combination of attributes --- platinum-sw-fetch.html | 3 +++ platinum-sw-import-script.html | 3 +++ 2 files changed, 6 insertions(+) diff --git a/platinum-sw-fetch.html b/platinum-sw-fetch.html index d4a9530..032fbe9 100644 --- a/platinum-sw-fetch.html +++ b/platinum-sw-fetch.html @@ -125,6 +125,9 @@ }; if (this.path && this.handler) { params.route = [this.path, this.handler, this.origin]; + } else { + console.log('The following platinum-sw-fetch element will not have any effect. ' + + 'Both the "path" and "handler" attributes must be set.', this); } resolve(params); }.bind(this)); diff --git a/platinum-sw-import-script.html b/platinum-sw-import-script.html index dc7364a..054d08a 100644 --- a/platinum-sw-import-script.html +++ b/platinum-sw-import-script.html @@ -49,6 +49,9 @@ var params = {}; if (this.href) { params.importscript = this.href; + } else { + console.log('The following platinum-sw-import-script element will not have any effect. ' + + 'The "href" attribute must be set.', this); } resolve(params); }.bind(this));