{"action":"created","issue":{"url":"https://api.github.com/repos/processing/p5.js/issues/395","labels_url":"https://api.github.com/repos/processing/p5.js/issues/395/labels{/name}","comments_url":"https://api.github.com/repos/processing/p5.js/issues/395/comments","events_url":"https://api.github.com/repos/processing/p5.js/issues/395/events","html_url":"https://github.com/processing/p5.js/issues/395","id":46055749,"number":395,"title":"createElement as method of p5.element?","user":{"login":"shiffman","id":191758,"avatar_url":"https://avatars.githubusercontent.com/u/191758?v=3","gravatar_id":"","url":"https://api.github.com/users/shiffman","html_url":"https://github.com/shiffman","followers_url":"https://api.github.com/users/shiffman/followers","following_url":"https://api.github.com/users/shiffman/following{/other_user}","gists_url":"https://api.github.com/users/shiffman/gists{/gist_id}","starred_url":"https://api.github.com/users/shiffman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiffman/subscriptions","organizations_url":"https://api.github.com/users/shiffman/orgs","repos_url":"https://api.github.com/users/shiffman/repos","events_url":"https://api.github.com/users/shiffman/events{/privacy}","received_events_url":"https://api.github.com/users/shiffman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/processing/p5.js/labels/area:dom","name":"area:dom","color":"009800"},{"url":"https://api.github.com/repos/processing/p5.js/labels/discussion","name":"discussion","color":"006b75"},{"url":"https://api.github.com/repos/processing/p5.js/labels/feature%20request","name":"feature request","color":"f7c6c7"}],"state":"open","locked":false,"assignee":{"login":"futuremarc","id":8646752,"avatar_url":"https://avatars.githubusercontent.com/u/8646752?v=3","gravatar_id":"","url":"https://api.github.com/users/futuremarc","html_url":"https://github.com/futuremarc","followers_url":"https://api.github.com/users/futuremarc/followers","following_url":"https://api.github.com/users/futuremarc/following{/other_user}","gists_url":"https://api.github.com/users/futuremarc/gists{/gist_id}","starred_url":"https://api.github.com/users/futuremarc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/futuremarc/subscriptions","organizations_url":"https://api.github.com/users/futuremarc/orgs","repos_url":"https://api.github.com/users/futuremarc/repos","events_url":"https://api.github.com/users/futuremarc/events{/privacy}","received_events_url":"https://api.github.com/users/futuremarc/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2014-10-17T01:58:30Z","updated_at":"2015-06-16T23:47:06Z","closed_at":null,"body":"I'm finding I'm doing this quite a bit in some examples:\r\n\r\n```\r\nvar div = createDiv('');\r\nvar a = createA('#','somelink');\r\na.parent(div); \r\n```\r\n\r\nI wonder if it would make sense to allow:\r\n\r\n```\r\nvar div = createDiv('');\r\nvar a = div.createA('#', 'somelink');\r\n```\r\n\r\nI am not at all sure about this. . . \r\n"},"comment":{"url":"https://api.github.com/repos/processing/p5.js/issues/comments/112604340","html_url":"https://github.com/processing/p5.js/issues/395#issuecomment-112604340","issue_url":"https://api.github.com/repos/processing/p5.js/issues/395","id":112604340,"user":{"login":"futuremarc","id":8646752,"avatar_url":"https://avatars.githubusercontent.com/u/8646752?v=3","gravatar_id":"","url":"https://api.github.com/users/futuremarc","html_url":"https://github.com/futuremarc","followers_url":"https://api.github.com/users/futuremarc/followers","following_url":"https://api.github.com/users/futuremarc/following{/other_user}","gists_url":"https://api.github.com/users/futuremarc/gists{/gist_id}","starred_url":"https://api.github.com/users/futuremarc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/futuremarc/subscriptions","organizations_url":"https://api.github.com/users/futuremarc/orgs","repos_url":"https://api.github.com/users/futuremarc/repos","events_url":"https://api.github.com/users/futuremarc/events{/privacy}","received_events_url":"https://api.github.com/users/futuremarc/received_events","type":"User","site_admin":false},"created_at":"2015-06-16T23:47:06Z","updated_at":"2015-06-16T23:47:06Z","body":"is there a better way to do this than to create copies of the methods but attach them to the p5.Element then rather than using `addElement()` to add it to the `pInst` we'll just use `child()` instead.\r\n\r\nI would use `call()` but the `addElement()` method seems to only add elements to `pInst`"}}