Andy E

United Kingdom

whattheheadsaid.com

Age: 31

I'm mainly a JavaScript coder, with some experience in other languages.

Apr
24
comment How to use Javascript to check and load CSS if not loaded?
@jmc: I can't imagine a use case for that – if it's linked to and not loaded, it's likely that a) it's not the only resource on the page that failed to load, or b) reloading it won't help. I answered what I thought was being asked and, evidently, that was correct.
Apr
23
answered Javascript array element not changing
Apr
22
awarded Nice Answer
Apr
22
answered maxZoom and User Input
Apr
22
comment maxZoom and User Input
Note that if you're displaying controls, this won't update disabled/enabled controls to reflect the new values.
Apr
22
awarded Yearling
Apr
22
awarded Yearling
Apr
18
awarded Autobiographer
Apr
15
revised How to display all methods in a JavaScript object?
added 274 characters in body
Apr
11
comment How to find the nearest common ancestors of two or more nodes?
This doesn't work because selectNode sets the start and end for the range as the referenced node's parent, see jsfiddle.net/3FaRr/13 (should alert "thisOne", but it doesn't find the correct common ancestor).
Apr
11
awarded Necromancer
Apr
9
awarded Great Answer
Apr
9
comment Javascript get content of previous element
@Barmar: previousSibling may select other node types too (e.g. comment nodes or text nodes). Note that previousElementSibling isn't supported in IE8 or lower.
Apr
7
comment Web worker crashes Chrome tab when passing large array of objects which have array buffers
@ErikJohansson: I still see the issue on Chrome 41 on a Samsung Galaxy Tab 4.
Apr
6
awarded Popular Question
Apr
4
comment Within same line, have a center element and right-most element
@John I must have missed your answer, else i would have gladly upvoted it in recognition of its superiority.
Apr
4
comment Is there an i18n (Intl) shim for JavaScript?
@hippietrail probably not. I investigated adding Collator early on in development and it would require large downloads to the user's browser for the DUCET and language files. I suspect this would put most people off and the trouble wouldn't be worth it in the end.
Apr
3
awarded Announcer
Apr
2
comment Is there a way to add/remove several classes in one single instruction with classList?
@Ryan: thanks, I thought DOMTokenList was supported in IE 9 but I guess it was missed. I'll try and investigate a workaround at some point.
Apr
2
awarded Revival
1 2 3 4 5