JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Mar 28, 2017 17:03
@rlemon Thanks :)
Mar 28, 2017 16:59
"HTML5 is supported in all modern browsers." (w3schools.com/html/html5_browsers.asp) can someone help me what are the modern browsers (which version)?
Mar 28, 2017 16:56
@rlemon thanks
Mar 28, 2017 16:53
Looking for the browser matrix support of ReactJS but found none on Google :(
Mar 28, 2017 16:52
Anyone knows the minimum version of Firefox that support ReactJS (or where can I find that information)?
Mar 27, 2017 09:14
thank you
Mar 27, 2017 09:08
Mar 27, 2017 09:05
anyway, thank you for your input
Mar 27, 2017 09:05
I think you are not understand my question, Sheepy.
Mar 27, 2017 09:04
oh, you edited your msg, so never mind
Mar 27, 2017 09:03
could you help me out with a link?
Mar 27, 2017 09:02
someone mentioned that "Modern browsers implement something known as back-forward cache (BFCache). When you hit back/forward button the actual page is not reloaded (and the scripts are never re-run)." in this link: stackoverflow.com/questions/8861181/…
Mar 27, 2017 09:01
but what I'm trying to figure it out is what is history.back() doing. Obviously it's not a full-page load.
Mar 27, 2017 09:01
I can see it mentions Browser back button === history.back()
Mar 27, 2017 09:00
looking at it...
Mar 27, 2017 08:59
really... no spec?
Mar 27, 2017 08:58
So maybe I have to figure it out myself on each browser to see what "goes back" really do with DOW, form state and js scripts.
Mar 27, 2017 08:57
is it in the spec, or browser specific?
Mar 27, 2017 08:56
how about form data state, js execution?
Mar 27, 2017 08:56
Hi guys, is there anything official about the Browser back button's behavior?
Jan 27, 2017 12:26
@littlepootis yeah, sorry I meant static typing. Like TypeScript.
Jan 27, 2017 12:25
@LearnHowToBeTransparent yeah, I meant static typing. That's sad :D
Jan 27, 2017 11:57
Hi guys, quick question: will they bring types to the future JS?
Feb 26, 2016 06:26
Hi guys, what if onFullfilled param in a Promise is a function that returns another promise? This document seems not to mention anything about it: developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/…
 

PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
Feb 15, 2016 03:43
T_STRING
Feb 15, 2016 03:42
oops, no, I mean function name
Feb 15, 2016 03:41
yeah, the next T_FUNCTION token, maybe.
Feb 15, 2016 03:40
Thanks Paul, I'll have to look up the CS's api to find out how to get the next token. In the worst case I think I'm gonna write a standalone script for my business.
Feb 15, 2016 03:23
well, that's sad.
Feb 15, 2016 03:22
@Danack thanks, I rarely active on reddit, but I'll try.
Feb 15, 2016 03:17
The $token object contains {"code":374,"type":"T_OPEN_TAG","content":"<?php","line":48,"column":17,"length‌​":6,"level":0,"conditions":[]}, I don't know how to get the "following" token. Google "php cs following token" wasn't give out useful information.
Feb 15, 2016 03:13
@PaulCrovella could you be more specific or is there a link I can read?
Feb 15, 2016 03:04
Hi guys, anyone here has experience in writing PHP Code Sniffer standard? I want to force all the <?= open tags must follow a function call (like this <?= escape(...) ?>), but the T_OPEN_TAG seems not to capture the escape function name in it. Please help.
Feb 10, 2016 16:13
Maybe I have to parse the url and then build up the url with correct query string.
Feb 10, 2016 16:12
@kodeart Oops, urlencode seems not quite right, I got https%3A%2F%2... which doesn't looks like a valid url too. I'm trying to escape a url in <img src="<?= $url ?>"/>. Do you have any idea?
Feb 10, 2016 16:00
@kodeart the full URL is a response from 3rd party so I think I just use urlencode.
Feb 10, 2016 15:58
Thanks
Feb 10, 2016 15:57
@Machavity is it the right way?
Feb 10, 2016 15:56
url&a=1 would turn into url&amp;a=1 and it obviously mess the a variable in the query string, @BobNocraz
Feb 10, 2016 15:52
Hi guys, what is the correct way to escape HTML attributes? I use htmlspecialchars but it changes & character into &amp; in my url and it mess the query string up.
Jan 9, 2016 21:43
Thank you @Danack I think I know what to do now.
Jan 9, 2016 21:39
I'm thinking where should I catch the exceptions.
Jan 9, 2016 21:39
That sounds good.
Jan 9, 2016 21:37
I made a small authorization library for CodeIgniter, it checks user permission in the controller class's constructor and call exit() if the user is not allowed to see the page since I don't want the methods to be executed. But exit() breaks the tests, so I have to think of something else here. Anyone has experience on this before?
Jan 9, 2016 21:33
yeah it's a bit more complex in CodeIgniter where I don't have full control in the render engine.
Jan 9, 2016 21:27
What is the better ways to handle the output instead of using die() or exit()?
Jan 9, 2016 21:26
From somewhere, I remember using die or exit() is not good for writing tests.
 
Feb 15, 2016 03:05
I understand and will obey all rules
Feb 11, 2016 16:21
Hi guys, is there anything like JSX in PHP? React has JSX to use JavaScript inside HTML, I'm looking for something like that in PHP.
Jan 19, 2016 07:00
Hi guys, what's the best Database Client that works in terminal?