OLD | NEW |
1 /* | 1 /* |
2 Distributed under both the W3C Test Suite License [1] and the W3C | 2 Distributed under both the W3C Test Suite License [1] and the W3C |
3 3-clause BSD License [2]. To contribute to a W3C Test Suite, see the | 3 3-clause BSD License [2]. To contribute to a W3C Test Suite, see the |
4 policies and contribution forms [3]. | 4 policies and contribution forms [3]. |
5 | 5 |
6 [1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license | 6 [1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license |
7 [2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license | 7 [2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license |
8 [3] http://www.w3.org/2004/10/27-testcases | 8 [3] http://www.w3.org/2004/10/27-testcases |
9 */ | 9 */ |
10 | 10 |
(...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1627 return map(template, function(x) { | 1627 return map(template, function(x) { |
1628 return make_dom_single(x, output_document); | 1628 return make_dom_single(x, output_document); |
1629 }); | 1629 }); |
1630 } | 1630 } |
1631 } | 1631 } |
1632 | 1632 |
1633 function render(template, substitutions, output_document) | 1633 function render(template, substitutions, output_document) |
1634 { | 1634 { |
1635 return make_dom(substitute(template, substitutions), output_document); | 1635 return make_dom(substitute(template, substitutions), output_document); |
1636 } | 1636 } |
| 1637 expose(render, "template.render"); |
1637 | 1638 |
1638 /* | 1639 /* |
1639 * Utility funcions | 1640 * Utility funcions |
1640 */ | 1641 */ |
1641 function assert(expected_true, function_name, description, error, substituti
ons) | 1642 function assert(expected_true, function_name, description, error, substituti
ons) |
1642 { | 1643 { |
1643 if (expected_true !== true) | 1644 if (expected_true !== true) |
1644 { | 1645 { |
1645 throw new AssertionError(make_message(function_name, description, | 1646 throw new AssertionError(make_message(function_name, description, |
1646 error, substitutions)); | 1647 error, substitutions)); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1752 { | 1753 { |
1753 w = w.parent; | 1754 w = w.parent; |
1754 rv.push(w); | 1755 rv.push(w); |
1755 } | 1756 } |
1756 ancestor_windows.result_cache = rv; | 1757 ancestor_windows.result_cache = rv; |
1757 return rv; | 1758 return rv; |
1758 } | 1759 } |
1759 | 1760 |
1760 })(); | 1761 })(); |
1761 // vim: set expandtab shiftwidth=4 tabstop=4: | 1762 // vim: set expandtab shiftwidth=4 tabstop=4: |
OLD | NEW |