{"action":"created","issue":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/4790","repository_url":"https://api.github.com/repos/bokeh/bokeh","labels_url":"https://api.github.com/repos/bokeh/bokeh/issues/4790/labels{/name}","comments_url":"https://api.github.com/repos/bokeh/bokeh/issues/4790/comments","events_url":"https://api.github.com/repos/bokeh/bokeh/issues/4790/events","html_url":"https://github.com/bokeh/bokeh/issues/4790","id":164876410,"number":4790,"title":"Widgets with JS API","user":{"login":"alexschlueter","id":369778,"avatar_url":"https://avatars.githubusercontent.com/u/369778?v=3","gravatar_id":"","url":"https://api.github.com/users/alexschlueter","html_url":"https://github.com/alexschlueter","followers_url":"https://api.github.com/users/alexschlueter/followers","following_url":"https://api.github.com/users/alexschlueter/following{/other_user}","gists_url":"https://api.github.com/users/alexschlueter/gists{/gist_id}","starred_url":"https://api.github.com/users/alexschlueter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexschlueter/subscriptions","organizations_url":"https://api.github.com/users/alexschlueter/orgs","repos_url":"https://api.github.com/users/alexschlueter/repos","events_url":"https://api.github.com/users/alexschlueter/events{/privacy}","received_events_url":"https://api.github.com/users/alexschlueter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-11T16:15:51Z","updated_at":"2016-07-12T21:51:02Z","closed_at":null,"body":"It is currently not possible to instantiate and show widgets from javascript, e.g.\r\n```js\r\nvar plt = Bokeh.Plotting;\r\nvar slider = Bokeh.Models('Slider');\r\nvar wb = new Bokeh.WidgetBox({children: [slider]});\r\nplt.show(wb); // bokeh-0.12.0.js:3761 Uncaught Error: models must be\r\n              // owned by only a single document\r\n```\r\n\r\n1. I have to use the workaround of calling `Bokeh.Models('Slider')` because Bokeh.Slider does not exist\r\n2. Even then, I get an error with the following trace:\r\n```\r\nbokeh-0.12.0.js:3761 Uncaught Error: models must be owned by only a single document\r\n\r\nHasProps.attach_document\t@\tbokeh-0.12.0.js:3761\r\nDocument._recompute_all_models\t@\tbokeh-0.12.0.js:6268\r\nDocument._pop_all_models_freeze\t@\tbokeh-0.12.0.js:6228\r\nDocument.add_root\t@\tbokeh-0.12.0.js:6316\r\nshow\t@\tbokeh-0.12.0.js:1458\r\n(anonymous function)\t@\tslider.js:5\r\n```"},"comment":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/comments/232192848","html_url":"https://github.com/bokeh/bokeh/issues/4790#issuecomment-232192848","issue_url":"https://api.github.com/repos/bokeh/bokeh/issues/4790","id":232192848,"user":{"login":"bryevdv","id":1078448,"avatar_url":"https://avatars.githubusercontent.com/u/1078448?v=3","gravatar_id":"","url":"https://api.github.com/users/bryevdv","html_url":"https://github.com/bryevdv","followers_url":"https://api.github.com/users/bryevdv/followers","following_url":"https://api.github.com/users/bryevdv/following{/other_user}","gists_url":"https://api.github.com/users/bryevdv/gists{/gist_id}","starred_url":"https://api.github.com/users/bryevdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryevdv/subscriptions","organizations_url":"https://api.github.com/users/bryevdv/orgs","repos_url":"https://api.github.com/users/bryevdv/repos","events_url":"https://api.github.com/users/bryevdv/events{/privacy}","received_events_url":"https://api.github.com/users/bryevdv/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T21:51:02Z","updated_at":"2016-07-12T21:51:02Z","body":"ping @mattpap can you comment"}}
{"actor":{"display_login":"bryevdv"}}