This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html Section: http://www.whatwg.org/specs/web-apps/current-work/complete.html#examples Comment: It would be nice if you could see the pretty glowing lines Posted from: 67.180.99.41 User agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-us) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document: http://dev.w3.org/html5/decision-policy/decision-policy.html Status: Accepted Change Description: see diff given below Rationale: Who can argue with that.
Checked in as WHATWG revision r6062. Check-in comment: by request http://html5.org/tools/web-apps-tracker?from=6061&to=6062
Why is it base64-encoded in the source? That makes me sad.
What would make you happy?
Not base64-encoding it, so it's readable in the source. base64 data URLs are only really needed for binary formats, not HTML. So just do something like <a href="data:text/html,<!DOCTYPE HTML> <html lang=en> <head> <title>Pretty Glowing Lines</title> </head> <body> <canvas width=800 height=450></canvas> <script> var context = document.getElementsByTagName('canvas')[0].getContext('2d'); var lastX = context.canvas.width * Math.random(); var lastY = context.canvas.height * Math.random(); var hue = 0; function line() { context.save(); context.translate(context.canvas.width/2, context.canvas.height/2); context.scale(0.9, 0.9); context.translate(-context.canvas.width/2, -context.canvas.height/2); context.beginPath(); context.lineWidth = 5 + Math.random() * 10; context.moveTo(lastX, lastY); lastX = context.canvas.width * Math.random(); lastY = context.canvas.height * Math.random(); context.bezierCurveTo(context.canvas.width * Math.random(), context.canvas.height * Math.random(), context.canvas.width * Math.random(), context.canvas.height * Math.random(), lastX, lastY); hue = hue + 10 * Math.random(); context.strokeStyle = 'hsl(' + hue + ', 50%, 50%)'; context.shadowColor = 'white'; context.shadowBlur = 10; context.stroke(); context.restore(); } setInterval(line, 50); function blank() { context.fillStyle = 'rgba(0,0,0,0.1)'; context.fillRect(0, 0, context.canvas.width, context.canvas.height); } setInterval(blank, 40); </script> </body> </html>">pretty glowing lines</a> Or is that invalid for some reason? I don't see why it should be. It works fine in browsers.
Pretty sure that's not a valid URL (for one it has spaces in it). V.nu says Error: Bad value data:text/html,<!DOCTYPE HTML>... for attribute href on element a: Illegal character in path component.
Why should it not be a valid URL, if it works in all browsers (assuming they support data URLs at all in this situation)?
The script is _right there_ in the spec already.
Um. Well, okay, that's true.
mass-move component to LC1