Closed larsonjj closed 10 years ago
@larsonjj nice catch, thanks!
I would suggest maybe change the property names to something other than delete going forward though, as it is not very pleasant to have to write socket['delete']. Maybe remove as a property name would be better?
This is why we ended up calling it destroy
in Sails on the backend. But since the delete
method really is a simulation of an HTTP DELETE, I don't want to make things confusing by overloading the destroy
term (since you could really have any logic you like hooked up an HTTP delete route-- not saying that would be a good idea :) )
How about keeping the official usage as io.socket.delete()
, but adding a synonym as io.socket.del()
?
io.socket.del()
as a synonym sounds good to me :+1:
There is an issue with using
delete
for object property names in IE8. It will throw an error sayingExpected Identifier
.I made some changes to make any object
delete
properties use the bracket notation instead of dot notation as that will take care of the issue for the time being.I would suggest maybe change the property names to something other than delete going forward though, as it is not very pleasant to have to write
socket['delete']
. Mayberemove
as a property name would be better?