Skip to content

Commit 2440b69

Browse files
committed
v1.0.13 release
This update contains a minor bug fix: BorisMoore/jsviews#455: "Using a tmpl selector that begins with a # but is not an ID selector does not work". This change applies to jsrender and jsviews The update also includes some minor documentation updates, and moves to the latest versions of JQuery and JQuery UI, for all samples, examples, and test pages. Sync with other changes in v1.0.13 for JsViews
1 parent 75f2059 commit 2440b69

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+72
-68
lines changed

demos/scenarios/01_default-values-scenario.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../jsrender.js" type="text/javascript"></script>
66
<link href="../resources/demos.css" rel="stylesheet" type="text/css" />
77

demos/scenarios/02_separators-scenario.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../jquery-1.8.0.js" type="text/javascript"></script>
66
<script src="../../jsrender.js" type="text/javascript"></script>
77
<link href="../resources/demos.css" rel="stylesheet" type="text/css" />

demos/scenarios/03_iterating-through-fields-scenario.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../jsrender.js" type="text/javascript"></script>
66
<link href="../resources/demos.css" rel="stylesheet" type="text/css" />
77

demos/scenarios/04_assigning-variables-scenario.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../jsrender.js" type="text/javascript"></script>
66
<link href="../resources/demos.css" rel="stylesheet" type="text/css" />
77

demos/scenarios/05_arrays-plus-headers-and-footers.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../jsrender.js" type="text/javascript"></script>
66
<link href="../resources/demos.css" rel="stylesheet" type="text/css" />
77

demos/step-by-step/01_inserting-data.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../jsrender.js" type="text/javascript"></script>
66
<link href="../resources/demos.css" rel="stylesheet" type="text/css" />
77
</head>

demos/step-by-step/02_compiling-named-templates-from-strings.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../jsrender.js" type="text/javascript"></script>
66
<link href="../resources/demos.css" rel="stylesheet" type="text/css" />
77

demos/step-by-step/03_converters-and-encoding.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../jsrender.js" type="text/javascript"></script>
66
<link href="../resources/demos.css" rel="stylesheet" type="text/css" />
77

demos/step-by-step/04_if-else-tag.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../jsrender.js" type="text/javascript"></script>
66
<link href="../resources/demos.css" rel="stylesheet" type="text/css" />
77

demos/step-by-step/05_for-tag.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../jsrender.js" type="text/javascript"></script>
66
<link href="../resources/demos.css" rel="stylesheet" type="text/css" />
77

demos/step-by-step/06_template-composition.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../jsrender.js" type="text/javascript"></script>
66
<link href="../resources/demos.css" rel="stylesheet" type="text/css" />
77

demos/step-by-step/07_paths.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../jsrender.js" type="text/javascript"></script>
66
<link href="../resources/demos.css" rel="stylesheet" type="text/css" />
77
</head>

demos/step-by-step/08_custom-tags.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../jsrender.js" type="text/javascript"></script>
66
<link href="../resources/demos.css" rel="stylesheet" type="text/css" />
77

demos/step-by-step/09_helper-functions.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../jsrender.js" type="text/javascript"></script>
66
<link href="../resources/demos.css" rel="stylesheet" type="text/css" />
77

demos/step-by-step/10_comparison-tests.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../jsrender.js" type="text/javascript"></script>
66
<link href="../resources/demos.css" rel="stylesheet" type="text/css" />
77

demos/step-by-step/11_accessing-parent-data.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../jsrender.js" type="text/javascript"></script>
66
<link href="../resources/demos.css" rel="stylesheet" type="text/css" />
77

demos/step-by-step/12_passing-in-context.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../jsrender.js" type="text/javascript"></script>
66
<link href="../resources/demos.css" rel="stylesheet" type="text/css" />
77

demos/step-by-step/13_associating-helpers-with-templates.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../jsrender.js" type="text/javascript"></script>
66
<link href="../resources/demos.css" rel="stylesheet" type="text/css" />
77

demos/variants/accessing-templates/01_compiling-template-objects-from-strings.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../../jsrender.js" type="text/javascript"></script>
66
<link href="../../resources/demos.css" rel="stylesheet" type="text/css" />
77

demos/variants/accessing-templates/02_registering-named-template-from-script-declaration.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../../jsrender.js" type="text/javascript"></script>
66
<link href="../../resources/demos.css" rel="stylesheet" type="text/css" />
77

demos/variants/accessing-templates/03_getting-template-objects-from-script-declaration.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../../jsrender.js" type="text/javascript"></script>
66
<link href="../../resources/demos.css" rel="stylesheet" type="text/css" />
77

demos/variants/accessing-templates/04_template-composition-subtemplates.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../../jsrender.js" type="text/javascript"></script>
66
<link href="../../resources/demos.css" rel="stylesheet" type="text/css" />
77

demos/variants/accessing-templates/05_template-composition-templateobjects.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js" type="text/javascript"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js" type="text/javascript"></script>
55
<script src="../../../jsrender.js" type="text/javascript"></script>
66
<link href="../../resources/demos.css" rel="stylesheet" type="text/css" />
77

jsrender-node.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
/*! JsRender v1.0.12: http://jsviews.com/#jsrender */
1+
/*! JsRender v1.0.13: http://jsviews.com/#jsrender */
22
/*! **VERSION FOR NODE.JS** (For WEB see http://jsviews.com/download/jsrender.js) */
33
/*
44
* Best-of-breed templating in browser or on Node.js.
55
* Does not require jQuery, or HTML DOM
66
* Integrates with JsViews (http://jsviews.com/#jsviews)
77
*
8-
* Copyright 2021, Boris Moore
8+
* Copyright 2023, Boris Moore
99
* Released under the MIT License.
1010
*/
1111

@@ -20,7 +20,7 @@ if (typeof exports !== 'object' ) {
2020
//========================== Top-level vars ==========================
2121

2222
// global var is the this object, which is window when running in the usual browser environment
23-
var versionNumber = "v1.0.12",
23+
var versionNumber = "v1.0.13",
2424
$, jsvStoreName, rTag, rTmplString, topView, $views,
2525
_ocp = "_ocp", // Observable contextual parameter
2626

jsrender.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! JsRender v1.0.12: http://jsviews.com/#jsrender */
1+
/*! JsRender v1.0.13: http://jsviews.com/#jsrender */
22
/*! **VERSION FOR WEB** (For NODE.JS see http://jsviews.com/download/jsrender-node.js) */
33
/*
44
* Best-of-breed templating in browser or on Node.js.
@@ -44,7 +44,7 @@ var setGlobals = $ === false; // Only set globals if script block in browser (no
4444

4545
$ = $ && $.fn ? $ : global.jQuery; // $ is jQuery passed in by CommonJS loader (Browserify), or global jQuery.
4646

47-
var versionNumber = "v1.0.12",
47+
var versionNumber = "v1.0.13",
4848
jsvStoreName, rTag, rTmplString, topView, $views, $expando,
4949
_ocp = "_ocp", // Observable contextual parameter
5050

@@ -1118,7 +1118,7 @@ function compileTmpl(name, tmpl, parentTmpl, options) {
11181118
}
11191119
} else if (value.charAt(0) === "#") {
11201120
elem = document.getElementById(value.slice(1));
1121-
} else if ($.fn && !$sub.rTmpl.test(value)) {
1121+
} if (!elem && $.fn && !$sub.rTmpl.test(value)) {
11221122
try {
11231123
elem = $(value, document)[0]; // if jQuery is loaded, test for selector returning elements, and get first element
11241124
} catch (e) {}

jsrender.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jsrender.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jsrender",
3-
"version": "v1.0.12",
3+
"version": "v1.0.13",
44
"description": "Best-of-breed templating in browser or on Node.js (with Express 4, Hapi and Browserify integration)",
55
"main": "./jsrender-node.js",
66
"browser": "./jsrender.js",

test/browserify/bundles/1-bundle.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/browserify/bundles/12-nested-bundle.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/browserify/bundles/2-bundle.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/browserify/bundles/3-bundle.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/browserify/bundles/htm-jsrender-tmpl-bundle.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
2-
/*! JsRender v1.0.12: http://jsviews.com/#jsrender */
2+
/*! JsRender v1.0.13: http://jsviews.com/#jsrender */
33
/*! **VERSION FOR WEB** (For NODE.JS see http://jsviews.com/download/jsrender-node.js) */
44
/*
55
* Best-of-breed templating in browser or on Node.js.
@@ -45,7 +45,7 @@ var setGlobals = $ === false; // Only set globals if script block in browser (no
4545

4646
$ = $ && $.fn ? $ : global.jQuery; // $ is jQuery passed in by CommonJS loader (Browserify), or global jQuery.
4747

48-
var versionNumber = "v1.0.12",
48+
var versionNumber = "v1.0.13",
4949
jsvStoreName, rTag, rTmplString, topView, $views, $expando,
5050
_ocp = "_ocp", // Observable contextual parameter
5151

@@ -1119,7 +1119,7 @@ function compileTmpl(name, tmpl, parentTmpl, options) {
11191119
}
11201120
} else if (value.charAt(0) === "#") {
11211121
elem = document.getElementById(value.slice(1));
1122-
} else if ($.fn && !$sub.rTmpl.test(value)) {
1122+
} if (!elem && $.fn && !$sub.rTmpl.test(value)) {
11231123
try {
11241124
elem = $(value, document)[0]; // if jQuery is loaded, test for selector returning elements, and get first element
11251125
} catch (e) {}

test/browserify/bundles/html-jsr-tmpl-bundle.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
2-
/*! JsRender v1.0.12: http://jsviews.com/#jsrender */
2+
/*! JsRender v1.0.13: http://jsviews.com/#jsrender */
33
/*! **VERSION FOR WEB** (For NODE.JS see http://jsviews.com/download/jsrender-node.js) */
44
/*
55
* Best-of-breed templating in browser or on Node.js.
@@ -45,7 +45,7 @@ var setGlobals = $ === false; // Only set globals if script block in browser (no
4545

4646
$ = $ && $.fn ? $ : global.jQuery; // $ is jQuery passed in by CommonJS loader (Browserify), or global jQuery.
4747

48-
var versionNumber = "v1.0.12",
48+
var versionNumber = "v1.0.13",
4949
jsvStoreName, rTag, rTmplString, topView, $views, $expando,
5050
_ocp = "_ocp", // Observable contextual parameter
5151

@@ -1119,7 +1119,7 @@ function compileTmpl(name, tmpl, parentTmpl, options) {
11191119
}
11201120
} else if (value.charAt(0) === "#") {
11211121
elem = document.getElementById(value.slice(1));
1122-
} else if ($.fn && !$sub.rTmpl.test(value)) {
1122+
} if (!elem && $.fn && !$sub.rTmpl.test(value)) {
11231123
try {
11241124
elem = $(value, document)[0]; // if jQuery is loaded, test for selector returning elements, and get first element
11251125
} catch (e) {}

test/perf-compare.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<title>Benchmark JsRender</title>
55
<link href="resources/perf-compare.css" rel="stylesheet" type="text/css" />
6-
<script src="//code.jquery.com/jquery-3.6.1.js"></script>
6+
<script src="//code.jquery.com/jquery-3.6.4.js"></script>
77
<script src="../jsrender.js" type="text/javascript"></script>
88
<script src="resources/jquery.tmpl.js" type="text/javascript"></script>
99

test/test.min.map.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="//code.jquery.com/jquery-3.6.1.js"></script>
4+
<script src="//code.jquery.com/jquery-3.6.4.js"></script>
55
<script src="../jsrender.min.js"></script>
66
</head>
77
<body>

test/unit-tests-amd-scriptloader.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<link href="//code.jquery.com/qunit/qunit-1.21.0.css" rel="stylesheet" type="text/css" />
55

6-
<script src="//code.jquery.com/jquery-3.6.1.js"></script>
6+
<script src="//code.jquery.com/jquery-3.6.4.js"></script>
77
<script src="//code.jquery.com/qunit/qunit-1.21.0.js"></script>
88

99
<script src="requirejs/require.js"></script>

test/unit-tests-browserify.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link href="//code.jquery.com/qunit/qunit-1.21.0.css" rel="stylesheet" type="text/css" />
5-
<script src="//code.jquery.com/jquery-3.6.1.js"></script>
5+
<script src="//code.jquery.com/jquery-3.6.4.js"></script>
66
<script src="//code.jquery.com/qunit/qunit-1.21.0.js"></script>
77
</head>
88
<body>

test/unit-tests-jsrender-no-jquery.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<script src="../jsrender.js"></script>
77

8-
<script src="//code.jquery.com/jquery-3.6.1.js"></script>
8+
<script src="//code.jquery.com/jquery-3.6.4.js"></script>
99
<script src="//code.jquery.com/qunit/qunit-1.21.0.js"></script>
1010

1111
<script src="unit-tests/tests-jsrender-no-jquery.js"></script>

test/unit-tests-jsrender-with-jquery.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<link href="//code.jquery.com/qunit/qunit-1.21.0.css" rel="stylesheet" type="text/css" />
55

6-
<script src="//code.jquery.com/jquery-3.6.1.js"></script>
6+
<script src="//code.jquery.com/jquery-3.6.4.js"></script>
77
<script src="//code.jquery.com/qunit/qunit-1.21.0.js"></script>
88

99
<script src="../jsrender.js"></script>

test/unit-tests/requirejs-config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Configure loading modules from the download directory,
22
requirejs.config({
3-
"baseUrl": "//www.jsviews.com/download", // Or point to correct local path on your system: "baseUrl": "/download",
4-
// "baseUrl": "../../download", // Or point to correct local path on your system: "baseUrl": "/download",
3+
"baseUrl": "//www.jsviews.com/download", // Or point to correct local path on your system: "baseUrl": "../../",
4+
// "baseUrl": "../../", // Or point to correct local path or URL on your system,
55
"paths": {
6-
"jquery": "//code.jquery.com/jquery-3.5.1",
6+
"jquery": "//code.jquery.com/jquery-3.6.4",
77
"jsrender": "./jsrender",
88
"jquery.observable": "./jquery.observable",
99
"jquery.views": "./jquery.views",

test/unit-tests/tests-jsrender-with-jquery.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ QUnit.test("render", function(assert) {
213213

214214
$("#result").html("<script id='tmpl' type='text/x-jsrender'>Content{{for #data}}{{:#index}}{{/for}}{{:~foo}}</script>");
215215
assert.equal($("#tmpl").render([null, undefined, 1], true), "Content012", 'render(array, true) renders an array without iteration');
216+
217+
$("#result").html('<div id="people"><script class="item-tmpl" type="text/x-jsrender">{{:name}}</script></div>');
218+
assert.equal($.templates("#people .item-tmpl").render({name: 'John'}), "John", 'Access template using "descendant" selector (with space): "#people .item-tmpl"');
219+
216220
$("#result").empty();
217221
});
218222

0 commit comments

Comments
 (0)