From 8a8c18e4640cbb0a8f73d8e8b613b8322b52937f Mon Sep 17 00:00:00 2001 From: Marcus Abrahamsson Date: Wed, 27 Jul 2016 15:17:45 +0200 Subject: [PATCH] Test script tag src with lower case An easy mistake you might do is to write XDomain instead of xdomain in the script tag. If you do so the attribute API will not work. Therefore I think the check always should be made with a lower cased version of the script src. --- src/xdomain.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xdomain.coffee b/src/xdomain.coffee index c66e399..69786d3 100644 --- a/src/xdomain.coffee +++ b/src/xdomain.coffee @@ -132,7 +132,7 @@ strip = (src) -> masters m for script in document.getElementsByTagName("script") - if /xdomain/.test(script.src) + if /xdomain/.test(script.src.toLowerCase()) for prefix in ['','data-'] for k,fn of attrs fn script.getAttribute prefix+k