{"action":"created","issue":{"url":"https://api.github.com/repos/ckeditor/ckeditor5-engine/issues/316","repository_url":"https://api.github.com/repos/ckeditor/ckeditor5-engine","labels_url":"https://api.github.com/repos/ckeditor/ckeditor5-engine/issues/316/labels{/name}","comments_url":"https://api.github.com/repos/ckeditor/ckeditor5-engine/issues/316/comments","events_url":"https://api.github.com/repos/ckeditor/ckeditor5-engine/issues/316/events","html_url":"https://github.com/ckeditor/ckeditor5-engine/issues/316","id":145930508,"number":316,"title":"Model: Element constructor should not require its second and third arguments","user":{"login":"Reinmar","id":156149,"avatar_url":"https://avatars.githubusercontent.com/u/156149?v=3","gravatar_id":"","url":"https://api.github.com/users/Reinmar","html_url":"https://github.com/Reinmar","followers_url":"https://api.github.com/users/Reinmar/followers","following_url":"https://api.github.com/users/Reinmar/following{/other_user}","gists_url":"https://api.github.com/users/Reinmar/gists{/gist_id}","starred_url":"https://api.github.com/users/Reinmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Reinmar/subscriptions","organizations_url":"https://api.github.com/users/Reinmar/orgs","repos_url":"https://api.github.com/users/Reinmar/repos","events_url":"https://api.github.com/users/Reinmar/events{/privacy}","received_events_url":"https://api.github.com/users/Reinmar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ckeditor/ckeditor5-engine/labels/module:treemodel","name":"module:treemodel","color":"fef2c0"},{"url":"https://api.github.com/repos/ckeditor/ckeditor5-engine/labels/type:enhancement","name":"type:enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/ckeditor/ckeditor5-engine/labels/%E2%98%85","name":"★","color":"ffffff"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-05T09:15:55Z","updated_at":"2016-04-05T09:22:22Z","closed_at":null,"body":"I've been looking at tests and this look bad:\r\n\r\n```js\r\nlet element = new Element( 'elem', [], [ 'foo' ] );\r\n```\r\n\r\nYou should be able to pass `null` for attributes, because creating an array on the fly every time you create an element is totally unnecessary. The same for children, where you actually can pass `null` but the API docs say that this arg is required as well."},"comment":{"url":"https://api.github.com/repos/ckeditor/ckeditor5-engine/issues/comments/205726756","html_url":"https://github.com/ckeditor/ckeditor5-engine/issues/316#issuecomment-205726756","issue_url":"https://api.github.com/repos/ckeditor/ckeditor5-engine/issues/316","id":205726756,"user":{"login":"Reinmar","id":156149,"avatar_url":"https://avatars.githubusercontent.com/u/156149?v=3","gravatar_id":"","url":"https://api.github.com/users/Reinmar","html_url":"https://github.com/Reinmar","followers_url":"https://api.github.com/users/Reinmar/followers","following_url":"https://api.github.com/users/Reinmar/following{/other_user}","gists_url":"https://api.github.com/users/Reinmar/gists{/gist_id}","starred_url":"https://api.github.com/users/Reinmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Reinmar/subscriptions","organizations_url":"https://api.github.com/users/Reinmar/orgs","repos_url":"https://api.github.com/users/Reinmar/repos","events_url":"https://api.github.com/users/Reinmar/events{/privacy}","received_events_url":"https://api.github.com/users/Reinmar/received_events","type":"User","site_admin":false},"created_at":"2016-04-05T09:22:22Z","updated_at":"2016-04-05T09:22:22Z","body":"OK, turns out that only the API docs are wrong. Both args are optional."}}