user2312612
user2312612

Reputation:

What does an open : function do in javascript?

I am looking at the wordpress core in edit-comments.js.

On line 383 is says:

open : function (comment_id, post_id, action ) {

I have looked online and cannot find what open : means?

Upvotes: 0

Views: 67

Answers (2)

taxicala
taxicala

Reputation: 21789

In your code, open is the name of an object's property, and : is used to define the value of given property.

var obj = {open: function() {}};
        // ^^^^ property name

var obj = {open: function() {}};
              // ^^^^^^^^^^^^^ Property value. 

Upvotes: 1

Lucky Chingi
Lucky Chingi

Reputation: 2258

Those are all the events for commentReply (line 273)

init, open, close, toggle, revert,etc..

Upvotes: 0

Related Questions