[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

How does Javascript work

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 47
Thread images: 9

File: 1501629448758.jpg (49KB, 525x700px) Image search: [Google]
1501629448758.jpg
49KB, 525x700px
I'm supposed to port something to webExtensions. It is an add-on that involves the analysis of Javascript.

I know that since webdevs can't code for toffee, they often use JQuery and whatnot. This confuses me, it's hard to tell what is a library and what isn't.

Where is the official specification for the "syscalls" of Javascript? If I wanted to prevent Javascript from sending information from a browser to the internet, what would I have to block?
>>
who dis lil girl
>>
>>61720208
Wife material.
>>
>>61720208
Disgusting freckle monster. Hitler should have gassed gingers.
>>
File: 1501606743678.png (360KB, 360x640px) Image search: [Google]
1501606743678.png
360KB, 360x640px
>>61720236
>>61720243
>>61720257

tell me about the javascript
>>
>>61720257
Freckles are hot af actually.
>>
>>61720269
>>61720208
scut!
>>
>>61720269
who's this owo
>>
File: 1497977543245.jpg (181KB, 900x1200px) Image search: [Google]
1497977543245.jpg
181KB, 900x1200px
>>61720712
>>61720688
>>61720303

tell me about the javascript
>>
>>61720996
It's for gay faggots (lol)
>>
File: 1499053912460.jpg (129KB, 540x960px) Image search: [Google]
1499053912460.jpg
129KB, 540x960px
>>61721090

Perhaps

I'm making this thread because a certain person who made a certain compiler is asking me difficult questions which I need to know these things about Javascript to answer.
>>
>>61720208
since you aren't going away and are too retarded to google it
>Where is the official specification for the "syscalls" of Javascript?
idk wtf this means
javascript doesn't make any kernal level calls, at least not directly. it is a scripting language, it is interpreted and executed by it's runtime environment and that will vary between platforms
>If I wanted to prevent Javascript from sending information from a browser to the internet, what would I have to block?
post or get of any kind
>>
>>61721810

Yes the browser is the kernel in this situation

Javascript is obviously sandboxed. There is an API that allows it to perform IO. I want to allow Javascript to not have any API features that allow it to do any type of AJAX.
>>
>>61721868
You could disable it, or run a script blocker.
>>
>>61721868
look for this string
new XMLHttpRequest()
in the source and kill it
>>
File: 3d whore.jpg (136KB, 540x960px) Image search: [Google]
3d whore.jpg
136KB, 540x960px
>>61722177

How do you know that's the only way a script can do AJAX

>>61722123

I am the script blocker
>>
>>61720208
You have a nice sister.
>>
>>61722390
developer.mozilla.org
will probably tell you everything you need to know.
>>
File: 1501627850199.jpg (44KB, 525x700px) Image search: [Google]
1501627850199.jpg
44KB, 525x700px
>>61722488

Yeah I've used MDN once or twice in my time you insolent cuck

It doesn't answer my questions
>>
>>61720208
>>61720269
>>61720996
>>61721400
>>61722390
>>61722547
That's a cute boy.
>>
>>61720208
fetch and XMLHttpRequest, but that's only for customizable requests.
There's also some CORS compatible IE only shit.

However, sending stuff to the web can't be prevented at all.
Just imagine creating a new image with src http://evilfuckingshitholyfuck?spyData=...

Can't really prevent that.
>>
>>61722627
Also don't forget that if the user really wants to make a "post" or "get" request and get the return value, they could create a form and submit that, with the target being an iFrame that the result could then be read from.

So basically, forget it, OP. If someone wants to sidestep your system, they can.
Stopping XHR and fetch will be enough to stop most people, but everyone who is not a retard will still be able to send as much as they want and there's nothing you can do.
>>
>>61722390
Block:
XMLHttpRequest
Fetch
Axios
Request
Json*
Get
Post
Put
Any and all http verbs
>>
>>61722627

Yes we can, by blocking all traffic from outside domains
>>
>>61722653

This would require the page to refresh, no?
>>
>>61722704
No, if you post to the iframe (via the target attribute on the form), then only the iframe's contents get refreshed.
>>
>>61722713

So we can check to see if forms have iframes as targets

This is the kind of info I needed
>>
>>61720208
Do you want to be stupid rich? Let me marry this girl
>>
>>61720208
post pic of her feet
>>
>>61722390
What have you done to it's eyes!?
>>
>>61720257
Why would he do that? Varg says gingers are descendants of ancient Egyptian royalty, and Hitler admired ancient Egyptians.
>>
File: 1501591589407.png (23KB, 300x300px) Image search: [Google]
1501591589407.png
23KB, 300x300px
>>61721868
look at mdn web apis then
also look at webextension apis to see if there's something to mitm network requests since that seems to be what you're trying to do
>>
>>61725715
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/proxy

pls now resume posting redhead cuties
>>
>>61720208
What's wrong with her face? Poor thing, this is what happens when you outlaw abortions
>>61720257
Pretty much this
>>
>her
>>
>>61722547
>It doesn't answer my questions

then you aren't asking the right question
>>
>>61720208
Disguting potato nigger.
>>
>>61720208
>>61720269
>>61720996
>>61721400
>>61722390
>>61722547

what's her name?
>>
>>61720208
All those pervs here. I bet she is like 12 years old.
>>
File: 1500744494032.jpg (297KB, 1589x1191px) Image search: [Google]
1500744494032.jpg
297KB, 1589x1191px
>>61727556
So what? I am too. Never heard of agekin? Check your privilege you fucking normie
>>
File: 1494409215017.png (731KB, 499x499px) Image search: [Google]
1494409215017.png
731KB, 499x499px
>>61720208
>>61720269
>>61720996
>>61721400
>>61722390
>>61722547
show us her bepis
>>
>>61728147
If it's a trap I will unironically kill me self
>>
>>61720208
>FAS+Potato
would still bang tho
>>
I came into this thread expecting Sansa, was greeted with jailbait
>>
>>61725769

those are all the pictures I have
>>
>>61728900
Name?
>>
>>61729295

https://orbitchan.org/w/res/639.html#q1068
Thread posts: 47
Thread images: 9


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.