{"push_id":2482054084,"size":3,"distinct_size":1,"ref":"refs/heads/abernix/update-segment-id-js","head":"8b092db4575cedb94b29df1dc48ead90418470f5","before":"957db434260b445db27791ce5ad6652cedc3bdd9","commits":[{"sha":"544f1f4084c44e3c266bbb43b6f102df2a3df11e","author":{"name":"Jesse Rosenberger","email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@jro.cc"},"message":"Define `analytics` in the global context to guard against `id=\"analytics\"`.\n\nThis defines `analytics` in the global context to guard against HTML elements\non the page potentially named \"analytics\".  This is necessary because we now\nhave some docs pages with elements using `id=\"analytics\"`.  Unfortunately,\ndue to a historical artifact in web-browser history it was once made possible\nto access HTML elements, from JavaScript, by their ID on the `window` object:\n\n   window[\"some-div-id\"]\n\nUnfortunately, Segment.io uses a JavaScript variable named `analytics`, and\nit's not possible to `push` stats into an HTML DIV which happens to also be\nnamed `analytics` and have those stats work. :)\n\nOf course, it's best to use the facilities that were actually designed for\nthat, like `document.getElementById`, but historical reasons have caused\nthis `window` access technique to still be the behavior for modern browsers.\n\nRef: https://github.com/apollographql/engine-docs/pull/135\nRef: https://github.com/apollographql/engine-docs/commit/acd4a8e5\nRef: https://github.com/apollographql/engine-docs/blame/ec045186/source/index.md#L21\nhttps://w3c.github.io/html/browsers.html#named-access-on-the-window-object.","distinct":false,"url":"https://api.github.com/repos/meteor/meteor-theme-hexo/commits/544f1f4084c44e3c266bbb43b6f102df2a3df11e"},{"sha":"dff019afc64795554b4ffc2bda0a17ec9f148bf7","author":{"name":"Jesse Rosenberger","email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@jro.cc"},"message":"Merge pull request #65 from meteor/abernix/guard-segment-io-against-html-analytics-id\n\nDefine `analytics` in the global context to guard against `id=\"analytics\"`.","distinct":false,"url":"https://api.github.com/repos/meteor/meteor-theme-hexo/commits/dff019afc64795554b4ffc2bda0a17ec9f148bf7"},{"sha":"8b092db4575cedb94b29df1dc48ead90418470f5","author":{"name":"Jesse Rosenberger","email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@jro.cc"},"message":"Update Segment.io Analytics code to latest version, v4.1.0.\n\nThis is a drive-by update which seemed worth landing, but turned out not to\nfix the solution to the problem I was trying to fix (see refs for what that\nturned out to be).\n\nRef: https://github.com/meteor/meteor-theme-hexo/commit/544f1f40\nRef: https://github.com/meteor/meteor-theme-hexo/pull/65","distinct":true,"url":"https://api.github.com/repos/meteor/meteor-theme-hexo/commits/8b092db4575cedb94b29df1dc48ead90418470f5"}]}
{"actor":{"display_login":"abernix"}}