Skip to content

Commit

Permalink
Merge pull request #11650 from emberjs/update-htmlbars
Browse files Browse the repository at this point in the history
[BUGFIX release] Update HTMLBars to 0.13.32.
  • Loading branch information
rwjblue committed Jul 4, 2015
2 parents 0465f5b + 95a8aa7 commit 3c23610
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"express": "^4.5.0",
"github": "^0.2.3",
"glob": "~4.3.2",
"htmlbars": "0.13.32",
"htmlbars": "0.13.33",
"qunit-extras": "^1.3.0",
"qunitjs": "^1.16.0",
"route-recognizer": "0.1.5",
Expand Down
8 changes: 4 additions & 4 deletions packages/ember-htmlbars/tests/attr_nodes/property_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if (isEnabled('ember-htmlbars-attribute-syntax')) {
}
});

QUnit.test('maxlength sets the property and attribute', function() {
QUnit.test('maxlength sets the property and attribute', function() {
view = EmberView.create({
context: { length: 5 },
template: compile('<input maxlength={{length}}>')
Expand All @@ -41,7 +41,7 @@ if (isEnabled('ember-htmlbars-attribute-syntax')) {
equal(view.element.firstChild.maxLength, 1);
});

QUnit.test('quoted maxlength sets the property and attribute', function() {
QUnit.test('quoted maxlength sets the attribute and is reflected as a property', function() {
view = EmberView.create({
context: { length: 5 },
template: compile('<input maxlength=\'{{length}}\'>')
Expand All @@ -52,14 +52,14 @@ if (isEnabled('ember-htmlbars-attribute-syntax')) {

if (canSetFalsyMaxLength()) {
Ember.run(view, view.set, 'context.length', null);
equal(view.element.firstChild.maxLength, 0);
equal(view.element.firstChild.maxLength, document.createElement('input').maxLength);
} else {
Ember.run(view, view.set, 'context.length', 1);
equal(view.element.firstChild.maxLength, 1);
}
});

QUnit.test('array value can be set as property', function() {
QUnit.test('array value can be set as property', function() {
view = EmberView.create({
context: {},
template: compile('<input value={{items}}>')
Expand Down
23 changes: 16 additions & 7 deletions packages/ember-views/lib/compat/render_buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export function renderComponentWithBuffer(component, contextualElement, dom) {
@private
*/

var RenderBuffer = function(domHelper) {
export default function RenderBuffer(domHelper) {
Ember.deprecate('`Ember.RenderBuffer` is deprecated.');
this.buffer = null;
this.childViews = [];
Expand All @@ -139,7 +139,18 @@ var RenderBuffer = function(domHelper) {
Ember.assert('RenderBuffer requires a DOM helper to be passed to its constructor.', !!domHelper);

this.dom = domHelper;
};

this.tagName = undefined;
this.buffer = null;
this._element = null;
this._outerContextualElement = undefined;
this.elementClasses = null;
this.elementId = null;
this.elementAttributes = null;
this.elementProperties = null;
this.elementTag = null;
this.elementStyle = null;
}

RenderBuffer.prototype = {

Expand Down Expand Up @@ -467,7 +478,7 @@ RenderBuffer.prototype = {

if (!canSetNameOnInputs && attrs && attrs.name) {
// IE allows passing a tag to createElement. See note on `canSetNameOnInputs` above as well.
tagString = '<'+stripTagName(tagName)+' name="'+escapeAttribute(attrs.name)+'">';
tagString = `<${stripTagName(tagName)} name="${escapeAttribute(attrs.name)}">`;
} else {
tagString = tagName;
}
Expand Down Expand Up @@ -504,9 +515,9 @@ RenderBuffer.prototype = {

if (props) {
for (prop in props) {
var normalizedCase = normalizeProperty(element, prop.toLowerCase()) || prop;
var { normalized } = normalizeProperty(element, prop);

this.dom.setPropertyStrict(element, normalizedCase, props[prop]);
this.dom.setPropertyStrict(element, normalized, props[prop]);
}

this.elementProperties = null;
Expand Down Expand Up @@ -618,5 +629,3 @@ RenderBuffer.prototype = {
return this.buffer;
}
};

export default RenderBuffer;

0 comments on commit 3c23610

Please sign in to comment.