{"action":"created","issue":{"url":"https://api.github.com/repos/elm-lang/package.elm-lang.org/issues/207","repository_url":"https://api.github.com/repos/elm-lang/package.elm-lang.org","labels_url":"https://api.github.com/repos/elm-lang/package.elm-lang.org/issues/207/labels{/name}","comments_url":"https://api.github.com/repos/elm-lang/package.elm-lang.org/issues/207/comments","events_url":"https://api.github.com/repos/elm-lang/package.elm-lang.org/issues/207/events","html_url":"https://github.com/elm-lang/package.elm-lang.org/issues/207","id":190575473,"number":207,"title":"Native review for qimingweng/elm-narcissus","user":{"login":"qimingweng","id":8117770,"avatar_url":"https://avatars.githubusercontent.com/u/8117770?v=3","gravatar_id":"","url":"https://api.github.com/users/qimingweng","html_url":"https://github.com/qimingweng","followers_url":"https://api.github.com/users/qimingweng/followers","following_url":"https://api.github.com/users/qimingweng/following{/other_user}","gists_url":"https://api.github.com/users/qimingweng/gists{/gist_id}","starred_url":"https://api.github.com/users/qimingweng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qimingweng/subscriptions","organizations_url":"https://api.github.com/users/qimingweng/orgs","repos_url":"https://api.github.com/users/qimingweng/repos","events_url":"https://api.github.com/users/qimingweng/events{/privacy}","received_events_url":"https://api.github.com/users/qimingweng/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-11-20T18:49:13Z","updated_at":"2016-11-21T22:06:00Z","closed_at":"2016-11-21T19:08:30Z","body":"I wrote a wrapper for [narcissus](https://github.com/qimingweng/narcissus) for Elm, called [elm-narcissus](https://github.com/qimingweng/elm-narcissus). This allows you to create inline CSS styles in Elm in a predictable, deterministic, and efficient way."},"comment":{"url":"https://api.github.com/repos/elm-lang/package.elm-lang.org/issues/comments/262082550","html_url":"https://github.com/elm-lang/package.elm-lang.org/issues/207#issuecomment-262082550","issue_url":"https://api.github.com/repos/elm-lang/package.elm-lang.org/issues/207","id":262082550,"user":{"login":"qimingweng","id":8117770,"avatar_url":"https://avatars.githubusercontent.com/u/8117770?v=3","gravatar_id":"","url":"https://api.github.com/users/qimingweng","html_url":"https://github.com/qimingweng","followers_url":"https://api.github.com/users/qimingweng/followers","following_url":"https://api.github.com/users/qimingweng/following{/other_user}","gists_url":"https://api.github.com/users/qimingweng/gists{/gist_id}","starred_url":"https://api.github.com/users/qimingweng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qimingweng/subscriptions","organizations_url":"https://api.github.com/users/qimingweng/orgs","repos_url":"https://api.github.com/users/qimingweng/repos","events_url":"https://api.github.com/users/qimingweng/events{/privacy}","received_events_url":"https://api.github.com/users/qimingweng/received_events","type":"User","site_admin":false},"created_at":"2016-11-21T22:06:00Z","updated_at":"2016-11-21T22:06:00Z","body":"Question, I can get this module working if this was the contents of the Native js code\r\n\r\n```js\r\nvar _user$project$Native_Narcissus = function() {\r\n  // Blatantly copied from inject.js in aphrodite\r\n\r\n  // Inject a string of styles into a <style> tag in the head of the document. This\r\n  // will automatically create a style tag and then continue to use it for\r\n  // multiple injections. It will also use a style tag with the `data-aphrodite`\r\n  // tag on it if that exists in the DOM. This could be used for e.g. reusing the\r\n  // same style tag that server-side rendering inserts.\r\n\r\n  // Cache this for speed\r\n  var styleTag = null;\r\n\r\n  var injectIntoStyleTag = function(cssString) {\r\n    if (typeof document === 'undefined') {\r\n      // Don't do this in non document environments\r\n      return;\r\n    }\r\n\r\n    if (styleTag == null) {\r\n      // Try to find a style tag with the `data-narcissus` attribute first.\r\n      styleTag = document.querySelector('style[data-narcissus]');\r\n\r\n      // If that doesn't work, generate a new style tag.\r\n      if (styleTag == null) {\r\n        // Taken from\r\n        // http://stackoverflow.com/questions/524696/how-to-create-a-style-tag-with-javascript\r\n        var head = document.head || document.getElementsByTagName('head')[0];\r\n        styleTag = document.createElement('style');\r\n\r\n        styleTag.type = 'text/css';\r\n        styleTag.setAttribute('data-narcissus', '');\r\n        head.appendChild(styleTag);\r\n      }\r\n    }\r\n\r\n    if (styleTag.styleSheet) {\r\n      // The style tag already has contents\r\n      styleTag.styleSheet.cssText += cssString;\r\n    } else {\r\n      // Most likely, you get to this else statement if the style tag was just\r\n      // generated\r\n      styleTag.appendChild(document.createTextNode(cssString));\r\n    }\r\n\r\n    return true;\r\n  };\r\n\r\n  return {\r\n    injectIntoStyleTag: injectIntoStyleTag,\r\n  };\r\n}();\r\n```\r\n\r\nWould such a module be accepted?"}}
{"actor":{"display_login":"qimingweng"}}