« first day (754 days earlier)      last day (4185 days later) » 

1:02 PM
oh...document.getElementsByClassName('test').item(0) is a valid method
@jAndy HTMLCollections and NodeList are at the same level as Document or Element, pretty much completely different interfaces
 
1:13 PM
did SO was down ?
@FlorianMargaine is it possible to embed a link ( un the address bar) which
something like
aaa.com/1.html

but then

javascript:doWork()
 
@FlorianMargaine: not talking about returns of specific functions, but the overall storage and access for collections and nodelists
and IF there are specs, no one really cares at least so far
 
@jAndy there are specs
 
more talking about Element, HTMLElement and Node objects
 
but WHATWG's living DOM standard and W3C DOM3 standards vary
 
I don't even get the HTMLCollection and NodeList objects really
like
 
1:15 PM
and browsers implement it the way they prefer in C++
 
second let me try something
 
for example in FF, the methods of NodeList are a subset of HTMLCollection
(in the C++ interface)
 
@jAndy You can grab items from HTMLCollections by name/id, as in document.forms['blah'] (probably not only in subscript notation, but never checked that; edit: Checked, you can use dot notation document.forms.blah)
 
it doesn't mean they show that in the prototype
@Zirak namedItem()
 
when you get the resulst of a call to QSA for instance
than result doesn't even own a prototype object
so you can't even figure by Object.getPrototypeOf
 
1:17 PM
document.forms.blah, document.forms['blah'] and document.forms.namedItem('blah') all work
 
that NodeList or HTMLCollection is inheritign anything
seems very in flux to me
 
@jAndy that's what I meant, according to the standards, it's not inherited from anything, it's a top level interface
 
@jAndy huh? you can in Chrome
 
FF doesn't work
didn't test in chrome to be honest
 
FF went all mental on DOM prototypes
 
1:18 PM
anybody ?
 
@RoyiNamir No, you can't.
 
If you could, people could own you on every link
 
@jAndy it does... even in FF, adding a method on NodeList.prototype, this method will be in the result of QSA
 
zirak they still can execute js
 
1:20 PM
Isn't this a lovely thought? <a href='http://gmail.com/javascript:location.href="http://pornz.com"'>Go to Gmail and get puppies!</a>
...or something around those lines
 
uhr.. yea you're right
NodeList.prototype.isPrototypeOf(list); also works on both correctly
 
which DOM standard should I comply with btw? WHATWG living DOM standard or W3C DOM3?
 
I had an error there
 
!!/convert 100C
...? Nothing?
 
@rlemon Is the bot - gasp - not running?
!!/help
 
1:22 PM
I made a new command, trying it out now
 
@jAndy this works perfectly in FF/Chrome/IE9
NodeList.prototype.forEach = Array.prototype.forEach;

document.querySelectorAll( selector ).forEach( function( el ) {
    el.textContent = Math.random();
});
 
is IE8 aware about NodeList objects aswell ?
 
dunno, can't try
 
!!/choose "Learn CLisp" "Work on Node.js thingamajig" "Learn WebGL" "Work on your Github Game Off entry" "Waste your time! Seriously."
 
1:25 PM
@AmaanCheval All of the above
 
Bastard
 
@AmaanCheval All of the above
 
Is it broken or something?
!!/choose A B
 
@AmaanCheval Both!
You're just unlucky
 
I don't think the bot's even running :p
 
1:27 PM
@jAndy if you've got some IE8 running, try this: jsbin.com/isasob/1/edit
 
@AmaanCheval Learn CLisp
 
Thank you
 
Hi
$('entry',xml).length
 
@AmaanCheval
["Learn CLisp", "Work on Node.js thingamajig", "Learn WebGL", "Work on your Github Game Off entry", "Waste your time, son!"] 0.18797197192907333 "/choose input"
...
["Learn CLisp", "Work on Node.js thingamajig", "Learn WebGL", "Work on your Github Game Off entry", "Waste your time!"] 0.1036835485137999 "/choose input"
["A", "B"] 0.17255459516309202 "/choose input"
 
What does entry means
here
 
1:27 PM
$( xml ).find( 'entry' ); !!!!!!!!!!
thats so much more convenient
 
Be sure to include the bangs
Otherwise jquery might slack-off
 
thanks
 
I never understood how this "context" crap passed as second argument could ever get so popular
 
shorter than find()
 
Might want to even do: sudo $( xml ).find( 'entry' ); !!!!!!!!!!
 
1:28 PM
yea and more unreadable
 
don't think so :p
(I like to use it)
 
if you know what happens yes, might not be a problem, but if you're looking at a site like SO all day, you begin to realize that it causes more trouble and confusion than good
to novice guys
 
That's pretty cool considering it uses only CSS
 
@AmaanCheval yeah nice
@jAndy do you have IE8 somewhere? knowing whether the NodeList.prototype trick works interests me :p
 
Hadn't seen this one: lab.hakim.se/meny
 
1:31 PM
@FlorianMargaine: tried it, doesn't work. It has a NodeList object available, but modifying its prototypes doesn't inflict the results of QSA
and of course its unaware of Object.getPrototypeOf etc, but I didn't check .__proto__ might be interesting to see
 
sooooo btw, getElementsBy* methods are supposed to return HTMLCollections
 
!!/convert 10C
@Zirak F: 50, K: 283.15
 
!!/convert 70F
 
@FlorianMargaine C: 21.11111111111111, K: 294.2611111111112
 
toFixed(2) ?
 
1:35 PM
Yeah, was just thinking that as well
 
live NodeList should be dead
 
I would appreciate it
 
It can also do metric <=> imperial:
!!/convert 10m
@Zirak f: 32.808398950000004
 
there shouldn't be any, I mean
only HTMLCollections are live
@jAndy can you try this on IE8? jsbin.com/isasob/2/edit
 
don't think it will
nope, but it throws a differenct exception than I would have expected
 
1:39 PM
bah, js, y u no have num.maxPrecision
 
it's notorious that QSA is buggy on IE8, might work
 
"NodeList" is undefined.. but its infact define accessing via console
however, you can't assign anythin to its prototype
 
Which is worse in your opinion? A bug you can't find despite hours of searching or a bug you can find but can do nothing about?
 
the latter
 
Better the enemy you know...
 
1:40 PM
at least you know the solution
 
@Neil The one you can do nothing about, obviously
 
@jAndy ok :(
 
I just refuse to accept that there is a "bug I can't do nothing about"
 
^^ This
 
One you can't find is much worse. If you know you can't fix it, that's a resolution. If you can't find it, it'll drive you mental.
 
1:40 PM
that is impossible
 
@jAndy can't do anything / can do nothing*
 
@jAndy Really?
 
most definitely
 
So you're gonna fix FF DOM bugs?
 
...
 
1:41 PM
@Zirak Except you can't be sure there's nothing you can do about it
 
@FlorianMargaine Yeah, I learned in at Uni. Also, there is a badge for comments.
 
sooo the last live NodeList is childNodes
 
I'm sure I could, with enough time, effort and madness
 
@AmaanCheval True, but most likely you could do something about it
 
@FlorianMargaine: afaik, gEB* still returns live NodeLists at present
 
1:42 PM
With enough of those three you can, in theory, crack prime numbers too, that doesn't mean you will
 
@jAndy depends on browsers
 
And even if you think you can, that doesn't make it possible. I wanted to be a bear.
 
chrome returns HTMLCollection
no
 
@Zirak And you thought you could be one?
 
FF returns HTMLCollection
chrome returns NodeList
IE returns HTMLCollection too
 
1:43 PM
@AmaanCheval As a 5 year-old? Yeah. People told me I can be anything.
Fuckin liars.
 
I had an epic polar bear costume for Halloween. You can be anything you want to be!
 
Looking like a bear is not the same as being a bear.
 
@jAndy the thing is, DOM3 (now obsolete) says that gEB* methods should return NodeList, the new DOM4 says it should return HTMLCollections
 
@FlorianMargaine: bible says "don't steal"
 
If it looks like a bear, and it acts like a bear, it's probably a bear?
 
1:44 PM
Except when it's not
Because it's a very, very hungry duck
 
And you just made it go crazy
 
in many ways, DOM specs are like the bible, good and kind ideas but it takes AGES before everybody follows
 
A duck in bears clothing
 
@Zirak A duck that could tear a hole in you is just as dangerous as a bear
 
1:46 PM
You have a slinky, a dead rabbit and an amputated leg as weapons. To the north, there is the pissed off duck. You have 5 turns to escape.
 
By the way, how the hell did we begin comparing bears and ducks?
 
@Neil Yes.
 
@Neil When phenofuckinglongthinghere said that dressing up as a bear qualifies as being a bear.
 
@Zirak Use the blood from the dead rabbit on the slinky to make it spring-like.. insert in amputated leg to make improvised cannon.. sling rocks at duck
 
So we agree that if it's a duck, it's also a bear?
duck == bear
 
1:47 PM
While you try to launch an amputated leg stuck to a spring, the duck fucks you.
           GAME OVER
       DUCK MADNESS 4
INSERT COIN TO CONTINUE
 
@Zirak At least you gave it the ol' MacGyver try
 
Protip: Instead of trying to laucnh an amputated leg with a slinky, why not just throw it...?
 
I think throwing/launching is a mistake. It's a duck, and you basically have an extra long kicking device. I say kick the fuck out of that evil little thing.
 
@jAndy also, for reference, W3C DOM4 is supposed to merge in the living DOM standard changes over time
so you can trust WHATWG
 
@phenomnomnominal Approach duck and kick repeatedly. Confirm? [Y\n]
 
1:50 PM
Y
 
but yeah, the implementations take a long time before standards are applied...
 
!!/learn botisback "Yo! Bot is back up"
 
@rlemon Command botisback learned
 
@rlemon Command botisback learned
!!/tell @AmaanCheval botisback
 
@AmaanCheval Yo! Bot is back up
 
1:51 PM
@AmaanCheval Yo! Bot is back up
 
bear == duck might be true, but I'm wondering.. even bear === duck should be true since both have type mammal
 
ducks lay eggs... are they mammals?
 
@Zirak Because you only have one chance.. if we're not dealing with an ordinary duck, there's no reason to assume you can outrun it, therefore there's no reason to assume you can kill it with one blow
 
@phenomnomnominal: hmm! maybe not ?! :p
 
@phenomnomnominal You approach the duck. Its eyes begin to sparkle like an especially horny rabbit. As you approach the duck, thinking about spaghetti, you trip over the amputated leg and fall. The duck fuck you repeatedly.
@Neil So you thought using all your time and weapons on that one shot was worth it?
 
1:52 PM
@jAndy No, but a platypus is
 
@Zirak It's a hypothetical situation, so conceivably I could not only make it worth it, I could exert the energy of a nuclear bomb in its general direction.. of course that'd be stupid because it'd kill me too
 
Lets get dangerous.
 
Note to self: do not sing Paranoid Android aloud
SEx keeps going down, in @ThiefMaster's words :p
(StackExchange)
 

« first day (754 days earlier)      last day (4185 days later) »