Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Commit 78f5e7f

Browse files
Roger NgoRoger Ngo
Roger Ngo
authored and
Roger Ngo
committed
Making it more clear to access the property of the document and assigning the value within the HTML textarea to that property of the document instead of assigning it as the raw data value for the document.
1 parent 95c81b8 commit 78f5e7f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/textarea/client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ var doc = connection.get('examples', 'textarea');
3131
doc.subscribe(function(err) {
3232
if (err) throw err;
3333

34-
var binding = new StringBinding(element, doc);
34+
var binding = new StringBinding(element, doc, ['content']);
3535
binding.setup();
3636
});

examples/textarea/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function createDoc(callback) {
1414
doc.fetch(function(err) {
1515
if (err) throw err;
1616
if (doc.type === null) {
17-
doc.create('', callback);
17+
doc.create({ content: '' }, callback);
1818
return;
1919
}
2020
callback();

0 commit comments

Comments
 (0)