From oyasumi at gmail.com Thu Nov 1 03:17:05 2012 From: oyasumi at gmail.com (=?ISO-8859-1?Q?Johan_Sundstr=F6m?=) Date: Thu, 1 Nov 2012 03:17:05 -0700 Subject: [whatwg] Proposal for window.DocumentType.prototype.toString In-Reply-To: References: <5ADDD4F65DBE4310AE292FC787DAF33C@gmail.com> Message-ID: On Wed, Oct 31, 2012 at 7:33 PM, Ian Hickson wrote: > On Wed, 31 Oct 2012, Johan Sundstr?m wrote: > > On Wednesday, October 31, 2012 at 15:02 , Ian Hickson wrote: > > > On Tue, 30 Oct 2012, Johan Sundstr?m wrote: > > > > That said, I would still much enjoy a future where > > > > javascript:alert(document.doctype) would tell you something rich > about > > > > the page that we today need deep knowledge of document.compatMode > and/or > > > > combinations of XMLSerializer and parsers, or deep study of > DocumentType > > > > refdocs to tease out. > > > > > > Can you elaborate on that? > > > > Sure ? rich as in not "[object DocumentType]", but > > Well the toString() isn't what matters, it's what you can get from the > rest of the attributes on the object. Or are you just saying you wish > .toString() would expose the concatenated string? That would just be a > conveniece method. Is it worth the compat risk? > Yes, this is where our opinions differ. :-) To me, it is the (lack of) language integration that is the heart of the matter and the source of my itch ? not that what I attempted to do proved impossible to cobble together with a (perfectly functional!) solution using other documented DOM APIs scattered about in other disjunct parts of the browser object model, or pasting together object properties and programmer provided constant strings to almost reproduce the value sought. My own hack unintentionally got it wrong in several ways, for example, and I deem that unnecessary brittleness. >From my own experience, the only guaranteed safe, reliable and cross browser method for figuring out an object's class name is Object.prototype.toString.call(object_of_interest), so I would sacrifice consistency with DocumentType.prototype.toString behaviours of the past in an instance for a more useful and intuitive one. If a novice programmer's expectations on what happens when she uses the object in a string context is met, I'd call that improvement here. > ?on apple.com: > > > > ?on roxen.com: Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> > > I don't understand how that is different than document.compatMode, > really, other than the latter not exposing limited quirks mode. But in > theory at least, this information is already exposed. > It tells me what the doctype is, instead of the name of a bucket the browser sorts the doctype into for various semantic and standards compliance (and/or political) reasons. Both features are excellent, when they are the feature you seek, and they already bear decent names helping with their findability and learnability. I am essentially weary of the long knowledge gap and edit distance between alert(document.doctype) and alert((new XMLSerializer).serializeToString(document.doctype)) ? that we can straddle both in this group we already proved; I aspire to help the other 99%. > ?on the Firefox default homepage: > > PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" > > [...] > > This is for XML, right? In HTML the bit in the square brackets would just > be dropped. It's not clear that it's worth exposing just for XML... > > Anyway, this is the DOM Core spec, so I'll let Anne, Aryeh, and Ms2ger > give you a proper answer. :-) It probably is, and it's also where the change would be useful; were SVG and other DOMs exempt from returning a string serialization, it would be a substantially less useful change. -- / Johan Sundstr?m, http://ecmanaut.blogspot.com/ From froidure_nicolas at yahoo.fr Thu Nov 1 09:53:08 2012 From: froidure_nicolas at yahoo.fr (Nicolas Froidure) Date: Thu, 01 Nov 2012 17:53:08 +0100 Subject: [whatwg] Meta "bugreport" proposal In-Reply-To: References: <5090EDA7.9040309@yahoo.fr> <5090F5A6.2080901@gmx.de> <5090F81F.6010303@yahoo.fr> Message-ID: <5092A8F4.6020400@yahoo.fr> On 31/10/2012 20:33, Ian Hickson wrote: > On Wed, 31 Oct 2012, Nicolas Froidure wrote: > >> I think we need a specification to allow users to report websites bugs >> from their browser. That's why i think it could be usefull to add a meta >> markup like this : >> >> >> The uri could be : >> - mailto: to send a report by mail (ex: mailto:webmaster at example.org) >> - http: to send the bug report a a simple HTTP POST request (ex: >> http://example.org/bugreport). >> - bug: something more customizable to allow webmasters to fit bug reports with >> their systems (ex: bug:http?uri=/bug.dat&method=POST&captcha=/captcha.jpg ) >> - etc (ws:, irc: ...) >> >> In order to test this i just made a Chrome extension illustrating how browsers >> could handle this meta markup : >> https://chrome.google.com/webstore/detail/bugmeback/hgmagcomobmjhaomdoihiggpdekaehmg >> >> The code is there : https://github.com/nfroidure/BugMeBack >> >> Are you interested in that kind of approach for bug reporting ? >> > This seems interesting. My recommendation would be to continue developing > the extension, and to try to convince browser vendors and site owners that > this is a good feature to expose. If there is momentum behind a feature > such as this, it is much easier to push it into a spec. > > See also: > > http://wiki.whatwg.org/wiki/FAQ#Is_there_a_process_for_adding_new_features_to_a_specification.3F > I have made a Opera version of the extension today (it's on the repo for anyone who want to test). I've got a strong experience on Firefox add-ons so it wouldn't take a lot of time to do it for me. As some developper told me, it's on Internet Explorer that there's issues most of the time but no idea on how to do that for this browser, if anyone want to help, feel free. In order to promote this feature, you have to know that the bug reports can be copy/paste into a mail when the is not present. That's why i already use the extension to report bugs to webmasters. I suggest anyone who think the feature should become a spec to report bugs this way. On my side, i'll get most feedback i can and then write uses cases. Feel free to give me yours. > > On Wed, 31 Oct 2012, Julian Reschke wrote: > >> , not. >> > Indeed From froidure_nicolas at yahoo.fr Thu Nov 1 10:39:47 2012 From: froidure_nicolas at yahoo.fr (Nicolas Froidure) Date: Thu, 01 Nov 2012 18:39:47 +0100 Subject: [whatwg] Meta "bugreport" proposal In-Reply-To: <50921720.7090107@oupeng.com> References: <5090EDA7.9040309@yahoo.fr> <50921720.7090107@oupeng.com> Message-ID: <5092B3E3.5030800@yahoo.fr> On 01/11/2012 07:30, Kang-Hao (Kenny) Lu wrote: > I am not sure a new scheme is a good idea. For embedding data in a URL, > you might consider something like > > data:text/plain,http?uri=/bug.dat&method=POST&captcha=/captcha.jpg > > but I am not an expert on this to say whether this is a good idea. > It seems better. I added this to issues on GitHub. > I am not familiar Chrome extension API and what > chrome.extension.sendRequest does, but if it does send an email when > @href is a mailto: URL, you might want to either: > > 1. Discuss with whoever creates the entry for rel=webmaster in [1] to > see if either rel=webmaster can be dropped or rel=bugreport can be > merged into it. > 2. Extract mailto: URL from rel=webmaster too and treat it as if it is > rel=bugreport. > Unfortunately, the mailto protocol doesn't accept more than 1048 characters. It's not enought to cover console messages and the screenshot provided as a dataUri. It could be done by creating an internet resource and then providing a link via the mailto protocol, but i'm not able to host that content myself. In the other hand it could be a good way for browser vendors to have tracability on bug reports done with their browser in order to know the main issues encountered by their users. I know opera currently have quality programs to retrieve bugs and contact webmasters manually. From ojan at chromium.org Thu Nov 1 10:45:07 2012 From: ojan at chromium.org (Ojan Vafai) Date: Thu, 1 Nov 2012 10:45:07 -0700 Subject: [whatwg] Should scrollbars move focus? In-Reply-To: References: Message-ID: On Wed, Oct 31, 2012 at 4:17 PM, Peter Kasting wrote: > On Wed, Oct 31, 2012 at 4:08 PM, Ojan Vafai wrote: > >> On Wed, Oct 31, 2012 at 3:46 PM, Robert O'Callahan > >wrote: >> > I think what's happening here in Gecko is that a click on a focusable >> > element moves focus, and a click on an element's scrollbars counts as a >> > click on the element. So clicking on the scrollbar of a