Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
cr changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelw committed Jan 21, 2014
1 parent 103de71 commit 270abde
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/TemplateBinding.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);

function getFragmentRoot(node) {
while (node.parentNode) {
node = node.parentNode;
var p;
while (p = node.parentNode) {
node = p;
}

return node;
Expand Down
7 changes: 7 additions & 0 deletions tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -1410,6 +1410,13 @@ suite('Template Instantiation', function() {
});

test('Ref at multiple', function() {
// Note: this test is asserting that template "ref"erences can be located
// at various points. In particular:
// -in the document (at large) (e.g. ref=doc)
// -within template content referenced from sub-content
// -both before and after the reference
// The following asserts ensure that all referenced templates content is
// found.
var id = 't' + Math.random();
var div = createTestHtml(
'<template bind>' +
Expand Down

0 comments on commit 270abde

Please sign in to comment.