use value property for textareas

pull/599/head
Rich Harris 8 years ago
parent b2ea03dde0
commit 70431dd794

@ -109,7 +109,7 @@ const lookup = {
title: {},
type: { appliesTo: [ 'button', 'input', 'command', 'embed', 'object', 'script', 'source', 'style', 'menu' ] },
usemap: { propertyName: 'useMap', appliesTo: [ 'img', 'input', 'object' ] },
value: { appliesTo: [ 'button', 'option', 'input', 'li', 'meter', 'progress', 'param', 'select' ] },
value: { appliesTo: [ 'button', 'option', 'input', 'li', 'meter', 'progress', 'param', 'select', 'textarea' ] },
width: { appliesTo: [ 'canvas', 'embed', 'iframe', 'img', 'input', 'object', 'video' ] },
wrap: { appliesTo: [ 'textarea' ] }
};

@ -0,0 +1,17 @@
export default {
'skip-ssr': true, // SSR behaviour is awkwardly different
data: {
foo: 42
},
html: `<textarea></textarea>`,
test ( assert, component, target ) {
const textarea = target.querySelector( 'textarea' );
assert.strictEqual( textarea.value, '42' );
component.set({ foo: 43 });
assert.strictEqual( textarea.value, '43' );
}
};

@ -0,0 +1 @@
<textarea value='{{foo}}'/>
Loading…
Cancel
Save