Skip to content

Commit

Permalink
Merge pull request #1465 from patrickkettner/add-templatestrings
Browse files Browse the repository at this point in the history
add templatestrings detect
  • Loading branch information
patrickkettner committed Dec 7, 2014
2 parents 576580e + 0f41610 commit 7386e9c
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 20 deletions.
25 changes: 25 additions & 0 deletions feature-detects/templatestrings.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*!
{
"name": "Template strings",
"property": "templatestrings",
"notes": [{
"name": "MDN Reference",
"href": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings#Browser_compatibility"
}]
}
!*/
/* DOC
Template strings are string literals allowing embedded expressions.
*/
define(['Modernizr'], function(Modernizr) {
Modernizr.addTest('templatestrings', function() {
var supports;
try {
// A number of tools, including uglifyjs and require, break on a raw "`", so
// use an eval to get around that.
eval('``');
supports = true;
} catch (e) {}
return !!supports;
});
});
41 changes: 21 additions & 20 deletions lib/config-all.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
"feature-detects": [
"test/a/download",
"test/applicationcache",
"test/audio",
"test/audio/loop",
"test/audio/preload",
"test/audio/webaudio",
"test/audio",
"test/battery/lowbattery",
"test/battery",
"test/battery/lowbattery",
"test/blob",
"test/canvas/todataurl",
"test/canvas",
"test/canvas/todataurl",
"test/canvastext",
"test/contenteditable",
"test/contextmenu",
Expand All @@ -42,8 +42,8 @@
"test/css/boxshadow",
"test/css/boxsizing",
"test/css/calc",
"test/css/chunit",
"test/css/checked",
"test/css/chunit",
"test/css/columns",
"test/css/cubicbezierrange",
"test/css/displayrunin",
Expand Down Expand Up @@ -84,8 +84,8 @@
"test/css/subpixelfont",
"test/css/supports",
"test/css/target",
"test/css/textshadow",
"test/css/textalignlast",
"test/css/textshadow",
"test/css/transforms",
"test/css/transforms3d",
"test/css/transformstylepreserve3d",
Expand All @@ -104,11 +104,10 @@
"test/dom/createElement-attrs",
"test/dom/dataset",
"test/dom/documentfragment",
"test/dom/microdata",
"test/dom/hidden",
"test/dom/microdata",
"test/dom/mutationObserver",
"test/draganddrop",
"test/elem/unknown",
"test/elem/datalist",
"test/elem/details",
"test/elem/output",
Expand All @@ -118,24 +117,25 @@
"test/elem/template",
"test/elem/time",
"test/elem/track",
"test/elem/unknown",
"test/emoji",
"test/es5/array",
"test/es5/date",
"test/es5/function",
"test/es5/object",
"test/es5/specification",
"test/es5/strictmode",
"test/es5/string",
"test/es5/syntax",
"test/es5/undefined",
"test/es6/array",
"test/es6/contains",
"test/es6/generators",
"test/es6/math",
"test/es6/number",
"test/es6/object",
"test/es6/string",
"test/es5/syntax",
"test/es5/undefined",
"test/es5/specification",
"test/es6/contains",
"test/es6/promises",
"test/es6/generators",
"test/es6/string",
"test/event/deviceorientation-motion",
"test/event/oninput",
"test/eventlistener",
Expand Down Expand Up @@ -179,12 +179,12 @@
"test/network/beacon",
"test/network/connection",
"test/network/eventsource",
"test/network/xhr-responsetype",
"test/network/xhr-responsetype-arraybuffer",
"test/network/xhr-responsetype-blob",
"test/network/xhr-responsetype-document",
"test/network/xhr-responsetype-json",
"test/network/xhr-responsetype-text",
"test/network/xhr-responsetype",
"test/network/xhr2",
"test/notification",
"test/pagevisibility-api",
Expand All @@ -204,13 +204,14 @@
"test/storage/sessionstorage",
"test/storage/websqldatabase",
"test/style/scoped",
"test/svg",
"test/svg/asimg",
"test/svg/clippaths",
"test/svg/filters",
"test/svg/inline",
"test/svg/foreignobject",
"test/svg/inline",
"test/svg/smil",
"test/svg",
"test/templatestrings",
"test/textarea/maxlength",
"test/touchevents",
"test/typed-arrays",
Expand All @@ -221,24 +222,24 @@
"test/url/parser",
"test/userdata",
"test/vibration",
"test/video",
"test/video/autoplay",
"test/video/loop",
"test/video/preload",
"test/video",
"test/vml",
"test/web-intents",
"test/webanimations",
"test/webgl/extensions",
"test/webgl",
"test/webgl/extensions",
"test/webrtc/getusermedia",
"test/webrtc/peerconnection",
"test/websockets/binary",
"test/websockets",
"test/websockets/binary",
"test/window/framed",
"test/workers/blobworkers",
"test/workers/dataworkers",
"test/workers/sharedworkers",
"test/workers/transferables",
"test/workers/webworkers"
]
}
}

0 comments on commit 7386e9c

Please sign in to comment.