canvas: function() { var e, n, t = !1, r = function() { var e =…
- User
canvas: function() { var e, n, t = !1, r = function() { var e = document.createElement("canvas"); return e.width = 1, e.height = 1, [e, e.getContext("2d")] }(), o = r[0], a = r[1]; if (function(e, n) { return !(!n || !e.toDataURL) }(o, a)) { t = function(e) { return e.rect(0, 0, 10, 10), e.rect(2, 2, 6, 6), !e.isPointInPath(5, 5, "evenodd") }(a), function(e, n) { e.width = 240, e.height = 60, n.textBaseline = "alphabetic", n.fillStyle = "#f60", n.fillRect(100, 1, 62, 20), n.fillStyle = "#069", n.font = '11pt "Times New Roman"'; var t = "Cwm fjordbank gly ".concat(String.fromCharCode(55357, 56835)); n.fillText(t, 2, 15), n.fillStyle = "rgba(102, 204, 0, 0.2)", n.font = "18pt Arial", n.fillText(t, 4, 45) }(o, a); var i = H(o); i !== H(o) ? e = n = "unstable" : (n = i, function(e, n) { e.width = 122, e.height = 110, n.globalCompositeOperation = "multiply"; for (var t = 0, r = [["#f2f", 40, 40], ["#2ff", 80, 40], ["#ff2", 60, 80]]; t < r.length; t++) { var o = r[t] , a = o[0] , i = o[1] , c = o[2]; n.fillStyle = a, n.beginPath(), n.arc(i, c, 40, 0, 2 * Math.PI, !0), n.closePath(), n.fill() } n.fillStyle = "#f9c", n.arc(60, 60, 60, 0, 2 * Math.PI, !0), n.arc(60, 60, 20, 0, 2 * Math.PI, !0), n.fill("evenodd") }(o, a), e = H(o)) } else e = n = ""; return { winding: t, geometry: e, text: n } },
whats that?
- Assistant
This is a JavaScript function that creates a canvas element, draws some shapes and text on it, and then checks if the canvas supports certain features like isPointInPath and globalCompositeOperation. It then returns an object with information about the winding algorithm used, the geometry of the canvas, and the text drawn on it.