{"action":"opened","issue":{"url":"https://api.github.com/repos/processing/p5.js/issues/1864","repository_url":"https://api.github.com/repos/processing/p5.js","labels_url":"https://api.github.com/repos/processing/p5.js/issues/1864/labels{/name}","comments_url":"https://api.github.com/repos/processing/p5.js/issues/1864/comments","events_url":"https://api.github.com/repos/processing/p5.js/issues/1864/events","html_url":"https://github.com/processing/p5.js/issues/1864","id":215444035,"number":1864,"title":"Using select() and option() with a <select> HTMLelement","user":{"login":"shiffman","id":191758,"avatar_url":"https://avatars3.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":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-20T14:48:33Z","updated_at":"2017-03-20T14:48:33Z","closed_at":null,"body":"This is going to be confusing due to the word \"select\" meaning two different things, let me see if I can explain!\r\n\r\nThe following works:\r\n\r\n```javascript\r\nvar dropdown = createSelect();\r\ndropdown.option('apple');\r\ndropdown.option('mango');\r\n```\r\n\r\nHowever, if I have an existing HTML element like:\r\n\r\n```html\r\n<select id=\"fruitlist></select>\r\n```\r\n\r\nThe following does not work:\r\n\r\n```javascript\r\nvar dropdown = select('#fruitlist');\r\ndropdown.option('apple');\r\ndropdown.option('mango');\r\n```\r\n\r\nIt seems that the `p5.Element` created is not properly noted as a `<select>` element and therefore does not have the `option()` method attached?\r\n\r\nI am happy to investigate this further, feedback or thoughts welcome."}}
{"actor":{"display_login":"shiffman"}}