What do the curly braces surrounding JavaScript arguments for functions do?
var port = chrome.extension.connect({name: "testing"}); port.postMessage
Curly braces in javascript are used as shorthand to create objects. For example:
// Create an object with a key "name" initialized to the value "testing" var test = { name : "testing" }; alert(test.name); // alerts "testing"
Check out Douglas Crockford's JavaScript Survey for more detail.