Tags "javascript" Result

JavaScript or not JavaScript

Hi, Just had an interesting message from someone who was unable to view one of my sites because they have JavaScript turned off, and expecting me to re-write my site so that they could view it... I''m interested in hearing other people''s opinions about this. I use JavaScript all the time, and can''t really imagine ASP.NET development without it.

it1352 2 2019-06-25

JavaScript parser in JavaScript

I need to add some lightweight syntactic sugar to JavaScript source code, and process it using a JavaScript-based build system. Are there any open source JavaScript parsers written in JavaScript? And are they reasonably fast when run on top of V8 or a similar high-performance JavaScript implementation? Thank you for any pointers you can provide!

it1352 7 2019-05-22

Javascript Module in Javascript

Ok the problem is simple. I want use two JavaScript files: one following the module pattern and another one that calls the firs one. I tested all the code using Node.js. When all the code is in one file it works but if I split the code in two files I get an error. Here's the code: // module.js var testModule = (function(){ "use strict"; var c

it1352 0 2019-05-22

Javascript recursion from Eloquent Javascript

So this is from the Eloquent Javascript. I am trying to figure out how this code is actually stepped through. So we are trying to find a way to reach the target number by adding either 5 or multiplying by 3, and we start from the number 1. So, essentially, we are trying to find a sequence of such additions and multiplications that produce the targe

it1352 3 2019-05-22

lightweight javascript to javascript parser

How would I go about writing a lightweight javascript to javascript parser. Something simple that can convert some snippets of code. I would like to basically make the internal scope objects in functions public. So something like this var outer = 42; window.addEventListener('load', function() { var inner = 42; function magic() { var

it1352 3 2019-05-14

text/javascript vs application/javascript

I am curious about the semantics of the MIME types application/javascript versus text/javascript. Obviously, one is supposed to be executed, and the other is supposed to be just text. I see application/javascript when looking at headers of an external .js load. HTTP/1.1 200 OK Date: Mon, 13 Jan 2014 18:32:58 GMT Server: Apache/2.2.22 (Unix) m

it1352 7 2019-05-22

javascript regex of a javascript string

I need to match a javascript string, with a regular expression, that is a string enclosed by single quote and can only contain a backslashed single quote. The examples string that i would match are like the following: 'abcdefg' 'abc\'defg' 'abc\'de\'fg' Solution This is the regex that matches all valid JavaScript literal string (that is surroun

it1352 3 2019-05-22

Lazy loading JavaScript and Inline JavaScript

I noticed in the <head> of my site (for work), there are a lot of <link rel="stylesheet" type="text/css" href="" /> and <script type="text/javascript" src=""> tags. There are even more JavaScript/CSS files that are only loaded for specific pages (we're using CodeIgniter, and the file paths are passed to the header view). I was c

it1352 5 2019-05-08

Add javascript variable to javascript src?

this may sound a bit noobish, but I'm trying to retrieve the video information for a YouTube video (I saw in some tutorial) basically here's the code function youtubeFeedCallback1(data) { var s = ''; var k = ''; s = data.entry.title.$t; k = data.entry.media$group.media$thumbnail[2].url; vidtitle1=s

it1352 0 2019-05-20

Javascript .map files - javascript source maps

Recently I have seen files with .js.map extension shipped with some JavaScript libraries (like Angular), and that just raised few questions in my head: What is it for? Why do the guys at Angular care to deliver a .js.map file? How can I (as a JavaScript developer) use the angular.min.js.map file? Should I care about creating .js.map files for my

it1352 3 2019-05-08