From odinho at opera.com Fri Feb 1 02:19:32 2013 From: odinho at opera.com (=?utf-8?Q?Odin_H=C3=B8rthe_Omdal?=) Date: Fri, 01 Feb 2013 11:19:32 +0100 Subject: [whatwg] IRC and WWW integration proposal In-Reply-To: <20130201074159.4079f494@desudesudesu> References: <20130201142600.dea98ee7b58e2637550be2c4@gmail.com> <20130201052458.269aac46@desudesudesu> <20130201150126.16a706397a491368142a8815@gmail.com> <20130201055511.332ca0b8@desudesudesu> <20130201074159.4079f494@desudesudesu> Message-ID: On Fri, 01 Feb 2013 07:41:59 +0100, Nils Dagsson Moskopp wrote: > Shane Allen schrieb am Thu, 31 Jan 2013 23:40:11 > -0600: > >> > A protocol attribute for elements would be totally hilarious. >> Not if the device is a tablet, or a phone running a browser that >> supports it. Need support from a page/article or even a project? Hit >> a button, and if the protocol is implemented, you're in the IRC >> channel able to garnish that support instantly. > We probably misunderstood each other. Protocols are mentioned at the > beginning of a URL; having a protocol attribute on a element > would therefore be redundant. To illustrate: Instead of: Or a more fitting example of how it could be used: WHATWG But, what happens now? WHATWG Hilarious :-) -- Odin H?rthe Omdal (Velmont/odinho) ? Core, Opera Software, http://opera.com From glenn at zewt.org Fri Feb 1 07:39:53 2013 From: glenn at zewt.org (Glenn Maynard) Date: Fri, 1 Feb 2013 09:39:53 -0600 Subject: [whatwg] Why do we have and ? In-Reply-To: References: <510988C1.1040900@lamouri.fr> Message-ID: On Thu, Jan 31, 2013 at 6:20 AM, Bruce Lawson wrote: > The use-case for an input type I imagine is that a browser can have a > select-like UI (Jan, Feb, March, April ...) which, in a French language > browser becomes "Janvier, Fevrier, Mars, Avril .. " (or even Vend?miaire to > Fructidor for FRC fans). > FYI, I would find this annoying. CC expiry entry forms are typically select boxes containing 01-12. The text lines up with what's on my credit card, so I don't have to translate "07" to "July" in my head when entering it off of my card. Any month picker for credit card expiry dates should always have month numbers (of course, names *in addition* to numbers are fine, though probably pointless). -- Glenn Maynard From mkwst at google.com Sat Feb 2 10:11:23 2013 From: mkwst at google.com (Mike West) Date: Sat, 2 Feb 2013 19:11:23 +0100 Subject: [whatwg] Sandboxed IFrames and downloads. Message-ID: It's currently possible to force a download by serving a file with a "Content-Disposition: attachment; filename=..." header. Notably, this mechanism can be used to download a file with minimal user interaction by including the resource to be downloaded in an IFrame. This holds even for sandboxed IFrames, as demonstrated by http://lcamtuf.coredump.cx/sandboxed.html (clicking that link will download a file, fair warning). It seems consistent with the general thought behind the `sandbox` attribute that it should control downloads as well as the bits it already locks down. I'd propose adjusting the spec to include a sandboxed downloads flag, which, when present, would block all downloads from inside the frame (or, perhaps only require user confirmation?). This restriction could be lifted via an 'allow-downloads' keyword, if present in the sandbox attribute's token list. WDYT? -- Mike West , Developer Advocate Google Germany GmbH, Dienerstrasse 12, 80331 M?nchen, Germany Google+: https://mkw.st/+, Twitter: @mikewest, Cell: +49 162 10 255 91 From nathan.f77 at gmail.com Mon Feb 4 14:09:07 2013 From: nathan.f77 at gmail.com (Nathan Broadbent) Date: Tue, 5 Feb 2013 11:09:07 +1300 Subject: [whatwg] Proposal: Add window.getLastError (or modify invocation arguments of window.onerror) Message-ID: Hi, The current information passed to window.onerror rarely provides sufficient information to find the cause of the error. The column number argument will be a big step forward, but a stack trace would be especially useful. I would like to add my support for improving the window.onerror arguments, with a fifth argument for stack trace. Is there anything that James or I could do to move this discussion along? Best, Nathan > Alright... so what's next? I'm assuming this needs further discussion with > other WHATWG members chiming in. If I can help, please let me know. I'd > like to see this request through. > Sincerely, > James Greene On Fri, May 11, 2012 at 12:26 PM, Simon Pieters wrote: > On Fri, 11 May 2012 17:14:00 +0200, James Greene > wrote: > > Simon: >> Yeah, I misunderstood your previous mention of having it as a [fifth] >> string argument. I somehow associated that automatically with the >> "message" parameter (the only string argument, I suppose) but I also >> noticed my mistake after I sent the email. >> > > OK. > > > I personally am interested in adding the stack trace, yes, >> > > OK, thanks. > > > but ideally I >> would just have access to the full "Error" object so I can always have an >> up-to-date model if the "Error" object continues to change (as it probably >> will). >> > > That's fair enough. Though not all exceptions are Errors -- DOMException > currently isn't, though I think some people want it to somehow inherit from > Error. > > > For example, some devs may be interested in the "Error" object's >> "name" property, which is already a part of the object today but is not >> provided to "window.onerror" callbacks. And again, if additional >> properties are added in the future, it's just more and more properties >> that >> may need to get incrementally added to the "window.onerror" invocation >> arguments list. For example, I proposed the addition of an "innerError" >> property (or some would call it "cause") for chaining errors and masking >> internal errors that consumers shouldn't see, instead providing a >> customer-facing message. >> > > Yeah. > > > You keep mentioning compile errors and how they don't have associated >> "Error" objects but it sounds like they still reach the "window.onerror" >> callbacks. Can you add a little commentary on that? >> > > Here are some examples: > > > > > > > > > > I thought they >> utilized the "SyntaxError" class but perhaps that's only for "eval()" >> calls...? >> > > Yes. Since the script doesn't compile, the same script can't catch any > exception in a try/catch block. onerror is just invoked with the > appropriate arguments, and currently doesn't expose any object. Hence, > compile errors currently do not expose any exception that Web pages can > observe. However, if we change onerror and expose the exception object for > uncaught exceptions, it would certainly make sense to specify that compile > errors be exposed using SyntaxError exceptions. > > If we expose the exception object in onerror (which I actually think makes > sense), what do we want to happen for cross-origin script errors? null? The > current arguments are masked as ("Script error.", "", 0, 0). > > > I may also be thinking of this differently as a JS engineer >> versus a browser vendor, so please help clue me in. I'm interested to >> learn more on this, and it may help me better appreciate why the >> "window.onerror" callback mechanism *didn't* just pass an "Error" object >> from the beginning. >> > > I think onerror is an old feature dating back from old Netscape or IE > (don't know which). Then other browsers just copied it. > > > I appreciate your continued feedback. Thanks! >> > > cheers > > -- > Simon Pieters > Opera Software > From dhtmlkitchen at gmail.com Mon Feb 4 14:40:51 2013 From: dhtmlkitchen at gmail.com (Garrett Smith) Date: Mon, 4 Feb 2013 14:40:51 -0800 Subject: [whatwg] Proposal: Add window.getLastError (or modify invocation arguments of window.onerror) In-Reply-To: References: Message-ID: On 2/4/13, Nathan Broadbent wrote: > Hi, > Hi Nathan - > The current information passed to window.onerror rarely provides > sufficient information to find the cause of the error. The column That's putting it mildly. > number argument will be a big step forward, but a stack trace would be > especially useful. I would like to add my support for improving the > window.onerror arguments, with a fifth argument for stack trace. Is > there anything that James or I could do to move this discussion along? I'm not married to the idea of having it be stuck onto window.onerror. There should be some way to get at the stack trace. [whatwg] window.onerror -ancient feature needs upgrade http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2007-September/012552.html | There needs to be a way to capture errors on the window. | | A method that passes an Error to the handler. One possible solution | would be to leverage the existing event system: | | addEventListener( "error", genericErrorEventHandler, false ); | | function genericErrorEventHandler( errorEvent ) { | }; There's a number of bugs for global error stack info. Bug 355430 - Stack information of uncaught Error object should be available in window.onerror https://bugzilla.mozilla.org/show_bug.cgi?id=355430 Bug 104408 - Summary: Add exception object and stack trace to window.onerror https://bugs.webkit.org/show_bug.cgi?id=104408 | "The spec explicitly states that onerror gives you the | error string, url, and line number. We can't arbitrarily | extends a spec as we see fit." Bug 55092 - Stack information of uncaught Error object should be available in window.onerror https://bugs.webkit.org/show_bug.cgi?id=55092 "Is there anything else blocking this?" https://bugs.webkit.org/show_bug.cgi?id=13646 (Apparently I "duplicated" that bug before the original, which came four years later O_o (or "search first!")). [...] >> but ideally I >>> would just have access to the full "Error" object so I can always have >>> an >>> up-to-date model if the "Error" object continues to change (as it >>> probably >>> will). >>> I agree. >> >> That's fair enough. Though not all exceptions are Errors -- DOMException >> currently isn't, though I think some people want it to somehow inherit >> from >> Error. >> Why not? >> >> For example, some devs may be interested in the "Error" object's >>> "name" property, which is already a part of the object today but is not >>> provided to "window.onerror" callbacks. And again, if additional >>> properties are added in the future, it's just more and more properties >>> that >>> may need to get incrementally added to the "window.onerror" invocation >>> arguments list. For example, I proposed the addition of an "innerError" >>> property (or some would call it "cause") for chaining errors and masking >>> internal errors that consumers shouldn't see, instead providing a >>> customer-facing message. >>> >> >> Yeah. >> Yep. Pass an error object with a stack trace. >> >> Yes. Since the script doesn't compile, the same script can't catch any >> exception in a try/catch block. onerror is just invoked with the >> appropriate arguments, and currently doesn't expose any object. Hence, >> compile errors currently do not expose any exception that Web pages can >> observe. However, if we change onerror and expose the exception object >> for >> uncaught exceptions, it would certainly make sense to specify that >> compile >> errors be exposed using SyntaxError exceptions. >> Early errors? www.ecma-international.org/ecma-262/5.1/#sec-16 -- Garrett Twitter: @xkit personx.tumblr.com From oliver at apple.com Mon Feb 4 14:44:37 2013 From: oliver at apple.com (Oliver Hunt) Date: Mon, 04 Feb 2013 14:44:37 -0800 Subject: [whatwg] Proposal: Add window.getLastError (or modify invocation arguments of window.onerror) In-Reply-To: References: Message-ID: <2A18872E-7F61-4470-A887-00CFEE9196AF@apple.com> On Feb 4, 2013, at 2:40 PM, Garrett Smith wrote: >>> That's fair enough. Though not all exceptions are Errors -- DOMException >>> currently isn't, though I think some people want it to somehow inherit >>> from >>> Error. >>> > Why not? That's something lost in the mists of time, however just asking it w.r.t DOMException misses the point that any value in js can be thrown - there's no requirement that it be an object, let alone a subtype of Error. > >>> >>> For example, some devs may be interested in the "Error" object's >>>> "name" property, which is already a part of the object today but is not >>>> provided to "window.onerror" callbacks. And again, if additional >>>> properties are added in the future, it's just more and more properties >>>> that >>>> may need to get incrementally added to the "window.onerror" invocation >>>> arguments list. For example, I proposed the addition of an "innerError" >>>> property (or some would call it "cause") for chaining errors and masking >>>> internal errors that consumers shouldn't see, instead providing a >>>> customer-facing message. >>>> >>> >>> Yeah. >>> > Yep. Pass an error object with a stack trace. That's tricky - what is your "stack trace"? You can very easily end up leaking private information across frames. --Oliver From esprehn at chromium.org Mon Feb 4 23:20:27 2013 From: esprehn at chromium.org (Elliott Sprehn) Date: Tue, 5 Feb 2013 02:20:27 -0500 Subject: [whatwg] Proposal: Add window.getLastError (or modify invocation arguments of window.onerror) In-Reply-To: <2A18872E-7F61-4470-A887-00CFEE9196AF@apple.com> References: <2A18872E-7F61-4470-A887-00CFEE9196AF@apple.com> Message-ID: On Mon, Feb 4, 2013 at 5:44 PM, Oliver Hunt wrote: > ... > That's tricky - what is your "stack trace"? You can very easily end up > leaking private information across frames. > > window.onerror is triggered across non-same origin frames? - E From cam at mcc.id.au Tue Feb 5 22:41:04 2013 From: cam at mcc.id.au (Cameron McCormack) Date: Wed, 06 Feb 2013 17:41:04 +1100 Subject: [whatwg] supporting HTMLElement.dataset on SVG elements Message-ID: <5111FB00.6000907@mcc.id.au> As part of aligning SVG with some not-so-HTML-specific features of HTML, the SVG WG would like to support data-* attributes on SVG elements. In mixed HTML/SVG documents, it seems like you would want to be able to use these attributes regardless of whether the elements are HTML or SVG, or indeed MathML. Does it make sense to move HTMLElement.dataset up to Element, so that all elements can benefit from it? If not, could this attribute be split out on to a separate interface that we could have SVGElement implement? (I'm also going to be looking at the other global attributes that HTML elements have to see if any make sense in SVG too.) Thanks, Cameron From wang.tietao at outlook.com Tue Feb 5 22:45:53 2013 From: wang.tietao at outlook.com (=?gb2312?B?zfXM+szX?=) Date: Wed, 6 Feb 2013 14:45:53 +0800 Subject: [whatwg] A question about the drawimage() canvas function Message-ID: Hi, there: This is about the drawimage() canvas function in html5. What should the following code ouput? /////////////// drawImage with an incorrect type for the image argument (part two)

FAIL (Script did not run.)

/////////////// In Chrome(24.0.1312.57) and Firefox(18.0.1), the output is:PASS while in Opera(12.12) and IE(10.0.9200.16439) it is:FAIL (No exception thrown) So, what should the result be? and what is the standard for this? Thanks,-Tietao Wang From davidc at nag.co.uk Wed Feb 6 02:56:43 2013 From: davidc at nag.co.uk (David Carlisle) Date: Wed, 06 Feb 2013 10:56:43 +0000 Subject: [whatwg] supporting HTMLElement.dataset on SVG elements In-Reply-To: <5111FB00.6000907@mcc.id.au> References: <5111FB00.6000907@mcc.id.au> Message-ID: <511236EB.8060304@nag.co.uk> On 06/02/2013 06:41, Cameron McCormack wrote: > As part of aligning SVG with some not-so-HTML-specific features of > HTML, the SVG WG would like to support data-* attributes on SVG > elements. In mixed HTML/SVG documents, it seems like you would want > to be able to use these attributes regardless of whether the elements > are HTML or SVG, or indeed MathML. > > Does it make sense to move HTMLElement.dataset up to Element, so that > all elements can benefit from it? If not, could this attribute be > split out on to a separate interface that we could have SVGElement > implement? > > (I'm also going to be looking at the other global attributes that > HTML elements have to see if any make sense in SVG too.) > > Thanks, > > Cameron > I'm also in favour of making any reasonable global feature act the same way across html/mathml/svg (hence the earlier request to move innerHTML and friends up to Element so they apply to MathML). David ________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom. This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. ________________________________________________________________________ From annevk at annevk.nl Wed Feb 6 10:25:59 2013 From: annevk at annevk.nl (Anne van Kesteren) Date: Wed, 6 Feb 2013 18:25:59 +0000 Subject: [whatwg] supporting HTMLElement.dataset on SVG elements In-Reply-To: <5111FB00.6000907@mcc.id.au> References: <5111FB00.6000907@mcc.id.au> Message-ID: On Wed, Feb 6, 2013 at 6:41 AM, Cameron McCormack wrote: > Does it make sense to move HTMLElement.dataset up to Element, so that all > elements can benefit from it? If not, could this attribute be split out on > to a separate interface that we could have SVGElement implement? Idea: just like the long term goal is to merge HTMLDocument into Document (already done spec-wise), maybe the long term goal for HTMLElement should be to become Element? This poops a bit on XML, but certainly less than