I forgot the commas in the object literal:
David-Sarah Hopwood wrote:
function makeGui(doc) { /const/ var title = doc.getElementById("title"), url = doc.getElementById("url"), input = doc.getElementById("input"); return Object.freeze({ get title() { return title.value; }, set title(newValue) { title.value = newValue; }, get url() { return url.value; }, set url(newValue) { url.value = newValue; }, get input() { return input.value; },
function makeGui(doc) { /const/ var title = doc.getElementById("title"), url = doc.getElementById("url"), input = doc.getElementById("input");
return Object.freeze({ get title() { return title.value; }, set title(newValue) { title.value = newValue; }, get url() { return url.value; }, set url(newValue) { url.value = newValue; }, get input() { return input.value; },
I forgot the commas in the object literal: David-Sarah Hopwood wrote: > function makeGui(doc) { > /*const*/ var title = doc.getElementById("title"), > url = doc.getElementById("url"), > input = doc.getElementById("input"); > > return Object.freeze({ get title() { return title.value; }, set title(newValue) { title.value = newValue; }, get url() { return url.value; }, set url(newValue) { url.value = newValue; }, get input() { return input.value; }, > set input(newValue) { input.value = newValue; } > }); > } -- David-Sarah Hopwood ⚥ http://davidsarah.livejournal.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 292 bytes Desc: OpenPGP digital signature URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20091227/4b067ea0/attachment.bin>
I forgot the commas in the object literal:
David-Sarah Hopwood wrote: