{"action":"created","issue":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/22435","repository_url":"https://api.github.com/repos/ampproject/amphtml","labels_url":"https://api.github.com/repos/ampproject/amphtml/issues/22435/labels{/name}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/22435/comments","events_url":"https://api.github.com/repos/ampproject/amphtml/issues/22435/events","html_url":"https://github.com/ampproject/amphtml/issues/22435","id":447207940,"node_id":"MDU6SXNzdWU0NDcyMDc5NDA=","number":22435,"title":"`toggleClass` could remove internal `i-amphtml-` and `amp-` prefixed classes","user":{"login":"xrav3nz","id":6376558,"node_id":"MDQ6VXNlcjYzNzY1NTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6376558?v=4","gravatar_id":"","url":"https://api.github.com/users/xrav3nz","html_url":"https://github.com/xrav3nz","followers_url":"https://api.github.com/users/xrav3nz/followers","following_url":"https://api.github.com/users/xrav3nz/following{/other_user}","gists_url":"https://api.github.com/users/xrav3nz/gists{/gist_id}","starred_url":"https://api.github.com/users/xrav3nz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xrav3nz/subscriptions","organizations_url":"https://api.github.com/users/xrav3nz/orgs","repos_url":"https://api.github.com/users/xrav3nz/repos","events_url":"https://api.github.com/users/xrav3nz/events{/privacy}","received_events_url":"https://api.github.com/users/xrav3nz/received_events","type":"User","site_admin":false},"labels":[{"id":530198214,"node_id":"MDU6TGFiZWw1MzAxOTgyMTQ=","url":"https://api.github.com/repos/ampproject/amphtml/labels/Category:%20Presentation","name":"Category: Presentation","color":"1d76db","default":false},{"id":255304066,"node_id":"MDU6TGFiZWwyNTUzMDQwNjY=","url":"https://api.github.com/repos/ampproject/amphtml/labels/Type:%20Bug","name":"Type: Bug","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":{"login":"aghassemi","id":2099009,"node_id":"MDQ6VXNlcjIwOTkwMDk=","avatar_url":"https://avatars3.githubusercontent.com/u/2099009?v=4","gravatar_id":"","url":"https://api.github.com/users/aghassemi","html_url":"https://github.com/aghassemi","followers_url":"https://api.github.com/users/aghassemi/followers","following_url":"https://api.github.com/users/aghassemi/following{/other_user}","gists_url":"https://api.github.com/users/aghassemi/gists{/gist_id}","starred_url":"https://api.github.com/users/aghassemi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aghassemi/subscriptions","organizations_url":"https://api.github.com/users/aghassemi/orgs","repos_url":"https://api.github.com/users/aghassemi/repos","events_url":"https://api.github.com/users/aghassemi/events{/privacy}","received_events_url":"https://api.github.com/users/aghassemi/received_events","type":"User","site_admin":false},"assignees":[{"login":"aghassemi","id":2099009,"node_id":"MDQ6VXNlcjIwOTkwMDk=","avatar_url":"https://avatars3.githubusercontent.com/u/2099009?v=4","gravatar_id":"","url":"https://api.github.com/users/aghassemi","html_url":"https://github.com/aghassemi","followers_url":"https://api.github.com/users/aghassemi/followers","following_url":"https://api.github.com/users/aghassemi/following{/other_user}","gists_url":"https://api.github.com/users/aghassemi/gists{/gist_id}","starred_url":"https://api.github.com/users/aghassemi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aghassemi/subscriptions","organizations_url":"https://api.github.com/users/aghassemi/orgs","repos_url":"https://api.github.com/users/aghassemi/repos","events_url":"https://api.github.com/users/aghassemi/events{/privacy}","received_events_url":"https://api.github.com/users/aghassemi/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2019-05-22T15:36:15Z","updated_at":"2019-05-23T16:21:40Z","closed_at":null,"author_association":"NONE","body":"## What's the issue?\r\n\r\n`toggleClass` could remove internal `i-amphtml-` and `amp-` prefixed classes\r\n\r\n## How do we reproduce the issue?\r\n\r\nhttps://jsbin.com/fobefivecu/edit?html,output\r\n\r\n```html\r\n<button on=\"tap:html.toggleClass(class='i-amphtml-singledoc')\">\r\n  toggle <code>html.i-amphtml-singledoc</code>\r\n</button>\r\n\r\n<button on=\"tap:body.toggleClass(class='amp-mode-mouse')\">\r\n  toggle <code>body.amp-mode-mouse</code>\r\n</button>\r\n```\r\n\r\nClicking on the buttons will remove `i-amphtml-singledoc` and `amp-mode-mouse` classes."},"comment":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/comments/495288198","html_url":"https://github.com/ampproject/amphtml/issues/22435#issuecomment-495288198","issue_url":"https://api.github.com/repos/ampproject/amphtml/issues/22435","id":495288198,"node_id":"MDEyOklzc3VlQ29tbWVudDQ5NTI4ODE5OA==","user":{"login":"aghassemi","id":2099009,"node_id":"MDQ6VXNlcjIwOTkwMDk=","avatar_url":"https://avatars3.githubusercontent.com/u/2099009?v=4","gravatar_id":"","url":"https://api.github.com/users/aghassemi","html_url":"https://github.com/aghassemi","followers_url":"https://api.github.com/users/aghassemi/followers","following_url":"https://api.github.com/users/aghassemi/following{/other_user}","gists_url":"https://api.github.com/users/aghassemi/gists{/gist_id}","starred_url":"https://api.github.com/users/aghassemi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aghassemi/subscriptions","organizations_url":"https://api.github.com/users/aghassemi/orgs","repos_url":"https://api.github.com/users/aghassemi/repos","events_url":"https://api.github.com/users/aghassemi/events{/privacy}","received_events_url":"https://api.github.com/users/aghassemi/received_events","type":"User","site_admin":false},"created_at":"2019-05-23T16:21:40Z","updated_at":"2019-05-23T16:21:40Z","author_association":"MEMBER","body":"@choumx How does bind handle this with `[class]`? Private classes would be easy to handle in both `toggleClass` and `[class]` cases, for public ones like `amp-mode-mouse` (incl. element specific public ones like `amp-carousel-slide`), we would need to maintain a list. "}}
{"actor":{"display_login":"aghassemi"}}