diff --git a/specs/parser/spec.js b/specs/parser/spec.js index dfca7a8a..11497678 100644 --- a/specs/parser/spec.js +++ b/specs/parser/spec.js @@ -360,7 +360,7 @@ test('Link Loading', function(){ }); test('Form Named Element Lookup', function(){ - expect(8); + expect(10); if ((typeof Envjs == 'undefined') || !Envjs) { Envjs = {}; } @@ -387,6 +387,12 @@ test('Form Named Element Lookup', function(){ ok(elements.input1 instanceof HTMLInputElement, 'is HTMLInputElement'); ok(form.input1 instanceof HTMLInputElement, 'is HTMLInputElement'); + // let's change the name + var node = form.input1; + node.name = 'input2'; + ok(elements.input1 instanceof HTMLInputElement, 'is HTMLInputElement'); + ok(form.input1 instanceof HTMLInputElement, 'is HTMLInputElement'); + /* // the other one should be zapped node2 = doc.foo;