« first day (2138 days earlier)      last day (3032 days later) » 

15:00
Hey, is there anyway to load a resource of any kind and then get a decent error from javascipt? EG a 404 or 301 etc
@MattCowley You won't see a redirect with JS, the browser follows those and you get whatever the new URL returned
@ivarni Ok, ignoring redirects. Can you get a 404 or 500 in anyway through js?
@MattCowley Yes, both XMLHttpRequest and fetch provides those
Eg. I load myscript.js and it returns a 500, can I detect that it is a 500 in js?
15:03
Oh you mean on script tags?
In any form
Here I was assuming xhr requests, sorry
Will it return UNKNOWN_URL_SCHEME?
Why doesn't it count my TF2 backpack value :(
@ivarni nah, anything, i just need a way to do it
15:03
@littlepootis lol $0 value nice
kind of BS since you have to "buy" tf2 now
@ivarni Do XHR requests work with URL schemes?
@MattCowley I'm not aware of any straight forward way of doing that. If you can detect that the script has loaded you can time out if it doesn't. HTML5 Spec mentions an error event on the element but I've never used that
function importScript(url) {
  const elm = document.createElement('script');
  elm.onerror = console.error.bind(console); // errors
  elm.src = src;
  document.body.appendChild(elm);
}
Yeah, that event
@rlemon Will that throw a meaningful error? and where will it thr it to/
15:07
try it
@rlemon index.js:4 Uncaught ReferenceError: src is not defined
oh
i can fi that
lol copy+paste
@rlemon It literraly just gives "error", that's useless ugh :(
I bet you're the type of person that runs :(){ :|:& };: in their shell (please don't do this, it's a fork bomb).
@BenFortune what on earth would that even do
15:11
bomb forks
@MattCowley sounds like that is the servers response
@ssube o
@rlemon I put the url as "test://"
chrme normally gives the url unonw scheme
fml I can't position this d3 chart worth shit
but yours just gave type "error"
@Loktar That's so forking metal.
Remember when people used dreamweaver
lets bring that back
@ApathyBear triggered
except have it not suck
waits for riots
dreamweaver still exists m8
plenty of marketing types use it for their shitty little wordpress sites
15:22
If dreamweaver sucked anymore, it'd be taking over @SterlingArcher's corner.
@ssube its stil shit
it will always be shit
dreamweaver is fine, if you didn't pay for it and only use 10% of its functionality ......
I'm pretty sure we encourage the upstairs non-dev types to use it so they can't get carried away and actually do anything significant
Or what is that stuff people like today... I believe its called Flex? Doesnt it have some weird WYSIWYG
15:23
@ssube until they use generated code, or 'design view' or the drag and drop designer, or any of the menu options
flex... i built an app using that 6 years ago... was terrible
@rlemon then they probably break their wp site and we just restore a backup
I remember looking at a Google job posting for Frontend Developer and they required flex
was like o_O
@rlemon How can I change elm.onerror = console.error.bind(console); to output as an alert?
the code for it wasn't that bad, but getting it to compile on any machine other than the one i built it on was a nightmare
15:26
@MattCowley why would you want too?
@rlemon Wanna test what error it throws on mobile
so change the callback to an alert
@rlemon alert(error) ?
I have no clue
time to google "how to assign a function as an event handler"
that is some pretty basic shit man
@rlemon I'm pretty basic
@rlemon but what is the error?
will it just be the first item passed to the funciton>
like function(error){alert(error);}
?
ah
15:31
atta boy
and i want event.type?
play around with the error object
read the docs
test the code
We're not the hand holding committee of Javascript.
That's what jsfiddle or codepen are for.
I will hold your hand, but for different reason
@rlemon the event object? is seems pretty useless.
15:33
:P
I think I might just go and accept that javascript really hates doing things nicley for me.
or you need to learn javascript for it to work at all
well it is capturing it in a sensible way.
Is this your first language? Or Do you have prior experience?
@ApathyBear I know some php and python
@ApathyBear I just expected js to be able to capture errors in a sensible way
not just "error"
Error: 418
15:36
@rlemon Any clue how I can do it then? I just need to request "cydia://" and then get the full error message Eg. "ERR_UNKNOWN_URL_SCHEME"
javascript has pretty damn good error handling
or, the tools that are usually available when using it do anyway
how did I edit that? weird.
well it is capturing it in a sensible way.
the event type is an error
errors in js are just another event
Ugh.
So there is no way to know what the error is?
so, uh, whoever mentioned EVE, thanks, I just got reinvited to EVE and I'm probably going to do it
search mdn error
15:37
rip my life
EVE == awesome
all my old eve friends are in a small corp now, that's too awesome to pass on
> EVE
> awesome
never heard those together before
@MattCowley you figure it out?
what are you trying to handle? when someone enters a crap protocol?
parse their inputs before you attempt it, or when an error is hit.
has anyone played Cosmic Rift ?
Was an old online 2D space shooter
testing to see how old I feel
15:44
I didn't play it, but I was playing games before the internet. so don't feel old?
(in fact many of us probably were)
I mean...I had an Atari 2600 before we got our NES.
SNES was our first system. iirc. we got a NES after the snes.
We got an NES, and then my shit of a little sister broke it by putting a PB&J sandwich in there before we went out of town for a week.
> I wanted it to save my sandwich!
15:47
I had a friend that dumb. tried to make grilled cheese in the toaster
ruined his parents toaster
@rlemon put the toaster on its side
Did he try that bullshit where the toaster is put on the side and shit?
"It was hungry ! "
'cause we had a barracks fire start that way.
15:48
just smushed the bread together and put it all in one slot
what happens if you put a toaster sideways?
@ssube risk of fire
life is a risk of fire
bread crumbs are meant to fall into the collection tray, not on the coils.
oh, that makes sense
so if you use very clean bread...
15:49
> very clean bread
!!afk something greasy
wash your bread before use, should be good
@Trasiva you don't wash your bread?
That's a very crumby thing to say @ssube.
you eat all the crumbs and dust and green leafy bits along the edges?
15:49
I actually soak my bread in bread before I toast it.
@Trasiva you what?!
@ssube That cat is in-bread.
I soak my bread in cats before I toast it.
@rlemon No, to detect if that protocol exists, and if it does, change what content is served.
15:52
@MattCowley rlemon is afk: something greasy
@ssube That's a really catastrophic combination.
nah, the little grills on either side of the toaster keep the cats contained
@MattCowley so on error assume it doesn't exist
@rlemon it also errors on the device where it exists
but it'll be a 404 not UNKNOWN_SCHEME
AN ERLANG PROCESS RUNS ON A SERVER A HASKELL THREAD RUNS IN YOUR IMAGINATION https://twitter.com/BartoszMilewski/status/747145800556347392
@KendallFrey
-1
Q: Office Word Addin development with Platform Independence and VSTO features

MujahedI have 2 Questions they are: a. For Developing Word Addin what i need to use(Office.js/OOXML/VSTO/Hybrid=VSTO+Office.js/SomethingElse) b. If we select any one then how can i use these features Change Tracking & Revision Pane Creating & Updating Existing Table of Contents Managing with Bookmar...

cv-pls
16:21
@BadgerCat I want one only if it's going to be SFW; unlike last time!
@ssube do people wash bread?
Oh.
That went over my head like everything else does
!!tell 32447696 woosh
16:37
!!tell :32447696 woosh
@SomeGuy It will be!
@BadgerCat what are they? what do they look like? :3
@BadgerCat what is this card business?
I have a collection of postcards on my fridge from various people and places, some nsfw
I signed up for a card, no idea what I just signed up for but im stoked !
@bitten I don't know yet, I will make them personalized for each one
16:46
@BadgerCat aw that sounds so nice. excited!
@ssube fill up the form and find out
@ssube sounds like there are some stories there..
@BadgerCat ok. I assume you need a full and complete address?
@ssube yeah
partial and incomplete. She likes a challenge
in fact, a series of hints is even better.
16:51
> Left of the big country, above the tree, go around that one spot, then turn behind the shop.
@Luggage you know me well
@bitten friend (of sorts) went to yurop, sent back cards
scope.$evalAsync((scope) => {
  scope.formContent.archive = "force";
  scope.$digest(); //do i need the $digest() call?
  console.log("$evalAsync called");
});
@BadgerCat I'll give you $10 to make SomeGuy's a giant penis.
@Trasiva No, I already sent him one once
16:57
Awww

« first day (2138 days earlier)      last day (3032 days later) »