00:01 | <Hixie_> | man, it's one thing for people to top-post in e-mail |
00:01 | <Hixie_> | but in bugs?! |
00:01 | <Hixie_> | really?! |
00:02 | <Hixie_> | trim your fricking context people |
00:02 | <zewt> | heh |
00:02 | <zewt> | i'm slowly caring less about top-posting in email, mostly because of mobile where editing quotes is just not happening |
00:19 | <galant> | is it possible to fire function while image is loading and then another function when image is loaded |
00:23 | <galant> | I want to do this, create img element assign src new image which is not loaded check when image is loaded then make another image that is loaded src attribute to be src of the first image, is this good idea? because I want to put another image when is loaded into src attribute of another imageto change images in img element but when second is fully loaded |
09:06 | <galant> | can I do something like this, element1.parentNode.element2 ? |
17:56 | <gsnedders> | It's impossible for a DOCTYPE token's name to be an empty string, right? |
17:56 | <gsnedders> | (It's either missing or non-empty.) |
18:49 | <ondras_> | Domenic_: understood, but DOM Promises have their own way, okay? (via the Resolver interface passed to ctor's function argument) |
19:10 | <Domenic_> | ondras_: DOM promises do it one way, the same way RSVP and then/promise and other Promises/A+ implementations do---all of those pass resolving abilities to the constructors function argument. Q has both deferreds and `Q.promise` which is something like the promise constructor. I don't know of any popular Promises/A+ libraries that put the ability to resolve, |
19:10 | <Domenic_> | fulfill, or reject directly on the promise---that's bad practice, since it prohibits you from separating the right to resolve a promise from the right to react to it via `then`. |
19:27 | <ondras_> | Domenic_: while the separation makes sense, the approach with callback-as-ctor-argument looks ugly to me |
19:27 | <ondras_> | i.e. a typical promise producent in my scenario |
19:27 | <ondras_> | has an async method |
19:28 | <ondras_> | X.prototype.doStuff = function() { this._promise = new Promise(); ...; return this._promise; } |
19:29 | <ondras_> | which, using the pattern described above, needs to look like... |
19:30 | <ondras_> | doStuff = function() { var p = new Promise(function(r) { this._resolver=r; }); ...; return p; } |
19:30 | <ondras_> | not very readable imho |
19:40 | <Domenic_> | ondras_: you seem to be claiming subjective readability is more important than security... that's not really going to work for a foundational web platform standard. |
19:46 | <ondras_> | Domenic_: okay, well, then the promises/a+ shall perhaps somehow accent that? my impl was based solely on a+ and the spec did not have any hints about how the fulfillment/rejection shall be handled, so I took the (in my opinion) most straightforward approach... |
19:47 | <ondras_> | (also because security is not that great deal for me - my promise's consumer is never going to manipulate its state, even if the api de facto allows that) |
19:52 | <Domenic_> | ondras_: Promises/A+ core spec is focused on the minimal amount necessary for interoperability, and that's a `then` method. Kind of the point of it is to not be very prescriptive about promise creation. It's totally fine for Promises/A+ implementations to be insecure; that way people who find it more readable that way, and don't value security, can use such |
19:52 | <Domenic_> | an insecure implementation---but because it conforms to Promises/A+, it's interoperable with everyone else's implementation, just by virtue of having a well-behaved `then` method! |
19:53 | <Domenic_> | ondras_: the upcoming Promises/A+ 1.1 revision tries to explain this in the readme a bit better. https://github.com/promises-aplus/promises-spec#promisesa |
19:58 | <ondras_> | Domenic_: okay then, thanks for explanation! |
20:00 | <Domenic_> | :) |
20:08 | <galant> | can Google web dev tools slows the oppening of webpage? becasue after I uploaded their file to my server the page is opening little slower, I am not sure if it is because of their link or what |
20:08 | <galant> | sry google webmaster tools |
20:58 | <nolanw> | I'm confused about some tree construction in the HTML spec, am I in the right place? |
20:59 | <SimonSapin> | nolanw: yes, although I probably can’t answer myself |
21:06 | <nolanw> | alright cool. Suppose I'm parsing the markup `<table><math>` and I get to the start tag named "math" in tree construction |
21:06 | <nolanw> | the spec says "insert a foreign element for the token" |
21:07 | <nolanw> | the current node is the `table` node, but in the description of inserting a foreign element it says "the current node, when the insert a foreign element algorithm is invoked, is always itself a non-HTML element" |
21:07 | <nolanw> | so my question is: does the element I insert for the `<math>` token undergo foster parenting? |