{"action":"created","comment":{"url":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/comments/24826835","id":24826835,"diff_hunk":"@@ -0,0 +1,109 @@\n+/**\n+ * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.\n+ * For licensing, see LICENSE.md.\n+ */\n+\n+'use strict';\n+\n+/**\n+ * Collections are ordered sets of models.\n+ *\n+ * Any event that is triggered on a model in a collection will also be triggered on the collection directly, for\n+ * convenience.\n+ *\n+ * @class Collection\n+ */\n+\n+CKEDITOR.define( [ 'emitter', 'utils' ], function( EmitterMixin, utils ) {\n+\tfunction Collection() {\n+\t\t/**\n+\t\t * The internal list of models in the collection.\n+\t\t *\n+\t\t * @property _models\n+\t\t * @private\n+\t\t */\n+\t\tObject.defineProperty( this, '_models', {\n+\t\t\tvalue: []\n+\t\t} );\n+\n+\t\t/**\n+\t\t * The number of items available in the collection.\n+\t\t *\n+\t\t * @property length\n+\t\t */\n+\t\tObject.defineProperty( this, 'length', {\n+\t\t\tget: function() {\n+\t\t\t\treturn this._models.length;\n+\t\t\t}\n+\t\t} );\n+\t}\n+\n+\t/**\n+\t * @inheritdoc utils#extend\n+\t */\n+\tCollection.extend = utils.extendMixin;\n+\n+\tutils.extend( Collection.prototype, EmitterMixin, {\n+\t\t/**\n+\t\t * Adds an item into the collection.\n+\t\t *\n+\t\t * Note that this is an array-like collection, so the same item can be present more than once. This behavior is\n+\t\t * for performance purposes only and is not guaranteed to be kept in the same way in the future.\n+\t\t *\n+\t\t * @param {Model} model The item to be added.\n+\t\t */\n+\t\tadd: function( model ) {\n+\t\t\tmodel.addParentEmitter( this );\n+\n+\t\t\tthis._models.push( model );\n+\n+\t\t\tthis.fire( 'add', model );","path":"src/mvc/collection.js","position":60,"original_position":60,"commit_id":"e65242a514220ee2c7adf7706ac4c8aba0f2c6fc","original_commit_id":"6981dabc9d52a07a5577a90a6bc5f4aabf2b0e44","user":{"login":"adelura","id":37869,"avatar_url":"https://avatars.githubusercontent.com/u/37869?v=3","gravatar_id":"","url":"https://api.github.com/users/adelura","html_url":"https://github.com/adelura","followers_url":"https://api.github.com/users/adelura/followers","following_url":"https://api.github.com/users/adelura/following{/other_user}","gists_url":"https://api.github.com/users/adelura/gists{/gist_id}","starred_url":"https://api.github.com/users/adelura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adelura/subscriptions","organizations_url":"https://api.github.com/users/adelura/orgs","repos_url":"https://api.github.com/users/adelura/repos","events_url":"https://api.github.com/users/adelura/events{/privacy}","received_events_url":"https://api.github.com/users/adelura/received_events","type":"User","site_admin":false},"body":"> This is why I don't like automatic bubbling.\r\n\r\nAs I proposed [here](https://gist.github.com/adelura/d72870b378fcf64e91fe#file-app-js-L4) bubbling should be disabled by default. And decision whether event is buble`able should be made when event is fired.\r\n\r\nEven if we see conflict here. By default bubbling is disabled, but only by passing fourth extra `target` argument into `on` method then it means that listening is on child element - see [here](https://gist.github.com/adelura/d72870b378fcf64e91fe#file-app-js-L22-L25). In [this](https://gist.github.com/adelura/d72870b378fcf64e91fe#file-app-js-L17-L19) listener bubbling doesn't affect.","created_at":"2015-02-17T16:09:52Z","updated_at":"2015-02-17T16:09:52Z","html_url":"https://github.com/ckeditor/ckeditor5-core/pull/13#discussion_r24826835","pull_request_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/comments/24826835"},"html":{"href":"https://github.com/ckeditor/ckeditor5-core/pull/13#discussion_r24826835"},"pull_request":{"href":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/13","id":28932314,"html_url":"https://github.com/ckeditor/ckeditor5-core/pull/13","diff_url":"https://github.com/ckeditor/ckeditor5-core/pull/13.diff","patch_url":"https://github.com/ckeditor/ckeditor5-core/pull/13.patch","issue_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/issues/13","number":13,"state":"open","locked":false,"title":"t/10: Basic Model implementation","user":{"login":"fredck","id":630060,"avatar_url":"https://avatars.githubusercontent.com/u/630060?v=3","gravatar_id":"","url":"https://api.github.com/users/fredck","html_url":"https://github.com/fredck","followers_url":"https://api.github.com/users/fredck/followers","following_url":"https://api.github.com/users/fredck/following{/other_user}","gists_url":"https://api.github.com/users/fredck/gists{/gist_id}","starred_url":"https://api.github.com/users/fredck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredck/subscriptions","organizations_url":"https://api.github.com/users/fredck/orgs","repos_url":"https://api.github.com/users/fredck/repos","events_url":"https://api.github.com/users/fredck/events{/privacy}","received_events_url":"https://api.github.com/users/fredck/received_events","type":"User","site_admin":false},"body":"Fixes #10.\r\n\r\nThis branch is based on t/11, which should be reviewed first.","created_at":"2015-02-09T16:04:08Z","updated_at":"2015-02-17T16:09:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94d9b4dec56cef27bbb39993dd3edf54cef0c7d7","assignee":{"login":"fredck","id":630060,"avatar_url":"https://avatars.githubusercontent.com/u/630060?v=3","gravatar_id":"","url":"https://api.github.com/users/fredck","html_url":"https://github.com/fredck","followers_url":"https://api.github.com/users/fredck/followers","following_url":"https://api.github.com/users/fredck/following{/other_user}","gists_url":"https://api.github.com/users/fredck/gists{/gist_id}","starred_url":"https://api.github.com/users/fredck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredck/subscriptions","organizations_url":"https://api.github.com/users/fredck/orgs","repos_url":"https://api.github.com/users/fredck/repos","events_url":"https://api.github.com/users/fredck/events{/privacy}","received_events_url":"https://api.github.com/users/fredck/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/13/commits","review_comments_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/13/comments","review_comment_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/issues/13/comments","statuses_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/statuses/e65242a514220ee2c7adf7706ac4c8aba0f2c6fc","head":{"label":"cksource:t/10","ref":"t/10","sha":"e65242a514220ee2c7adf7706ac4c8aba0f2c6fc","user":{"login":"cksource","id":825698,"avatar_url":"https://avatars.githubusercontent.com/u/825698?v=3","gravatar_id":"","url":"https://api.github.com/users/cksource","html_url":"https://github.com/cksource","followers_url":"https://api.github.com/users/cksource/followers","following_url":"https://api.github.com/users/cksource/following{/other_user}","gists_url":"https://api.github.com/users/cksource/gists{/gist_id}","starred_url":"https://api.github.com/users/cksource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cksource/subscriptions","organizations_url":"https://api.github.com/users/cksource/orgs","repos_url":"https://api.github.com/users/cksource/repos","events_url":"https://api.github.com/users/cksource/events{/privacy}","received_events_url":"https://api.github.com/users/cksource/received_events","type":"Organization","site_admin":false},"repo":{"id":29292185,"name":"ckeditor5-core","full_name":"cksource/ckeditor5-core","owner":{"login":"cksource","id":825698,"avatar_url":"https://avatars.githubusercontent.com/u/825698?v=3","gravatar_id":"","url":"https://api.github.com/users/cksource","html_url":"https://github.com/cksource","followers_url":"https://api.github.com/users/cksource/followers","following_url":"https://api.github.com/users/cksource/following{/other_user}","gists_url":"https://api.github.com/users/cksource/gists{/gist_id}","starred_url":"https://api.github.com/users/cksource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cksource/subscriptions","organizations_url":"https://api.github.com/users/cksource/orgs","repos_url":"https://api.github.com/users/cksource/repos","events_url":"https://api.github.com/users/cksource/events{/privacy}","received_events_url":"https://api.github.com/users/cksource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cksource/ckeditor5-core","description":"CKEditor 5 Core Framework.","fork":true,"url":"https://api.github.com/repos/cksource/ckeditor5-core","forks_url":"https://api.github.com/repos/cksource/ckeditor5-core/forks","keys_url":"https://api.github.com/repos/cksource/ckeditor5-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cksource/ckeditor5-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cksource/ckeditor5-core/teams","hooks_url":"https://api.github.com/repos/cksource/ckeditor5-core/hooks","issue_events_url":"https://api.github.com/repos/cksource/ckeditor5-core/issues/events{/number}","events_url":"https://api.github.com/repos/cksource/ckeditor5-core/events","assignees_url":"https://api.github.com/repos/cksource/ckeditor5-core/assignees{/user}","branches_url":"https://api.github.com/repos/cksource/ckeditor5-core/branches{/branch}","tags_url":"https://api.github.com/repos/cksource/ckeditor5-core/tags","blobs_url":"https://api.github.com/repos/cksource/ckeditor5-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cksource/ckeditor5-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cksource/ckeditor5-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/cksource/ckeditor5-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cksource/ckeditor5-core/statuses/{sha}","languages_url":"https://api.github.com/repos/cksource/ckeditor5-core/languages","stargazers_url":"https://api.github.com/repos/cksource/ckeditor5-core/stargazers","contributors_url":"https://api.github.com/repos/cksource/ckeditor5-core/contributors","subscribers_url":"https://api.github.com/repos/cksource/ckeditor5-core/subscribers","subscription_url":"https://api.github.com/repos/cksource/ckeditor5-core/subscription","commits_url":"https://api.github.com/repos/cksource/ckeditor5-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/cksource/ckeditor5-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/cksource/ckeditor5-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/cksource/ckeditor5-core/issues/comments/{number}","contents_url":"https://api.github.com/repos/cksource/ckeditor5-core/contents/{+path}","compare_url":"https://api.github.com/repos/cksource/ckeditor5-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cksource/ckeditor5-core/merges","archive_url":"https://api.github.com/repos/cksource/ckeditor5-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cksource/ckeditor5-core/downloads","issues_url":"https://api.github.com/repos/cksource/ckeditor5-core/issues{/number}","pulls_url":"https://api.github.com/repos/cksource/ckeditor5-core/pulls{/number}","milestones_url":"https://api.github.com/repos/cksource/ckeditor5-core/milestones{/number}","notifications_url":"https://api.github.com/repos/cksource/ckeditor5-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cksource/ckeditor5-core/labels{/name}","releases_url":"https://api.github.com/repos/cksource/ckeditor5-core/releases{/id}","created_at":"2015-01-15T10:25:18Z","updated_at":"2015-01-15T10:25:18Z","pushed_at":"2015-02-17T14:36:49Z","git_url":"git://github.com/cksource/ckeditor5-core.git","ssh_url":"git@github.com:cksource/ckeditor5-core.git","clone_url":"https://github.com/cksource/ckeditor5-core.git","svn_url":"https://github.com/cksource/ckeditor5-core","homepage":null,"size":297,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ckeditor:master","ref":"master","sha":"1521e5defbd8f55a7031493435681e759c04641c","user":{"login":"ckeditor","id":825710,"avatar_url":"https://avatars.githubusercontent.com/u/825710?v=3","gravatar_id":"","url":"https://api.github.com/users/ckeditor","html_url":"https://github.com/ckeditor","followers_url":"https://api.github.com/users/ckeditor/followers","following_url":"https://api.github.com/users/ckeditor/following{/other_user}","gists_url":"https://api.github.com/users/ckeditor/gists{/gist_id}","starred_url":"https://api.github.com/users/ckeditor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckeditor/subscriptions","organizations_url":"https://api.github.com/users/ckeditor/orgs","repos_url":"https://api.github.com/users/ckeditor/repos","events_url":"https://api.github.com/users/ckeditor/events{/privacy}","received_events_url":"https://api.github.com/users/ckeditor/received_events","type":"Organization","site_admin":false},"repo":{"id":28972890,"name":"ckeditor5-core","full_name":"ckeditor/ckeditor5-core","owner":{"login":"ckeditor","id":825710,"avatar_url":"https://avatars.githubusercontent.com/u/825710?v=3","gravatar_id":"","url":"https://api.github.com/users/ckeditor","html_url":"https://github.com/ckeditor","followers_url":"https://api.github.com/users/ckeditor/followers","following_url":"https://api.github.com/users/ckeditor/following{/other_user}","gists_url":"https://api.github.com/users/ckeditor/gists{/gist_id}","starred_url":"https://api.github.com/users/ckeditor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckeditor/subscriptions","organizations_url":"https://api.github.com/users/ckeditor/orgs","repos_url":"https://api.github.com/users/ckeditor/repos","events_url":"https://api.github.com/users/ckeditor/events{/privacy}","received_events_url":"https://api.github.com/users/ckeditor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ckeditor/ckeditor5-core","description":"CKEditor 5 Core Framework.","fork":false,"url":"https://api.github.com/repos/ckeditor/ckeditor5-core","forks_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/forks","keys_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/teams","hooks_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/hooks","issue_events_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/issues/events{/number}","events_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/events","assignees_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/assignees{/user}","branches_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/branches{/branch}","tags_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/tags","blobs_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/statuses/{sha}","languages_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/languages","stargazers_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/stargazers","contributors_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/contributors","subscribers_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/subscribers","subscription_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/subscription","commits_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/issues/comments/{number}","contents_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/contents/{+path}","compare_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/merges","archive_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/downloads","issues_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/issues{/number}","pulls_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls{/number}","milestones_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/milestones{/number}","notifications_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/labels{/name}","releases_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/releases{/id}","created_at":"2015-01-08T15:47:45Z","updated_at":"2015-02-16T13:36:34Z","pushed_at":"2015-02-16T13:36:33Z","git_url":"git://github.com/ckeditor/ckeditor5-core.git","ssh_url":"git@github.com:ckeditor/ckeditor5-core.git","clone_url":"https://github.com/ckeditor/ckeditor5-core.git","svn_url":"https://github.com/ckeditor/ckeditor5-core","homepage":null,"size":380,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/13"},"html":{"href":"https://github.com/ckeditor/ckeditor5-core/pull/13"},"issue":{"href":"https://api.github.com/repos/ckeditor/ckeditor5-core/issues/13"},"comments":{"href":"https://api.github.com/repos/ckeditor/ckeditor5-core/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/ckeditor/ckeditor5-core/statuses/e65242a514220ee2c7adf7706ac4c8aba0f2c6fc"}}}}