Skip to content

Commit ee0b810

Browse files
committed
Main files and more to come
The upload includes all main files, but there should be more files to come concerning Gulp. Also the wiki link in the index.html files is not accurate! Link should be corrected after generating a suitable wiki.
0 parents  commit ee0b810

File tree

7 files changed

+86
-0
lines changed

7 files changed

+86
-0
lines changed

example1/index.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
5+
<meta charset = "UTF-8">
6+
<title>concatenating strict files!</title>
7+
<script language = "javascript" type = "text/javascript" src = "smooth.js"></script>
8+
</head>
9+
10+
<body onload = "do_something(); forbidden();">
11+
12+
<article>
13+
At the start of the website there should appear successive two alert windows.
14+
<a href="https://github.com/Incrementis/Javascript-strict-mode-/wiki">concatenating strict files Wiki</a>
15+
</article>
16+
17+
</body>
18+
19+
</html>

example1/smooth.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//function should cause an error in strict mode
2+
function forbidden()
3+
{
4+
alert("forbiden works");
5+
var arguments = [];
6+
}
7+
//Activating globally strict mode
8+
"use strict";
9+
10+
//The function is not really needed. Its purpose is only to fill the file.
11+
function do_something()
12+
{
13+
alert("do_something works!");
14+
}
15+

example2/Error.JPG

10.2 KB
Loading

example2/index.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
5+
<meta charset = "UTF-8">
6+
<title>concatenating strict files!</title>
7+
<script language = "javascript" type = "text/javascript" src = "tough.js"></script>
8+
</head>
9+
10+
<body onload = "do_something(); forbidden();">
11+
12+
<article>
13+
If you see the following error in your browsers debugging mode:<br>
14+
<img src = "Error.JPG" alt = "NO PICTURE FOUND"><br>
15+
than your js version is using strict mode successfully!
16+
<a href="https://github.com/Incrementis/Javascript-strict-mode-/wiki">concatenating strict files Wiki</a>
17+
</article>
18+
19+
</body>
20+
21+
</html>

example2/tough.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//Activating globally strict mode
2+
"use strict";
3+
4+
//The function is not really needed. Its purpose is only to fill the file.
5+
function do_something()
6+
{
7+
alert("do_something works!");
8+
}
9+
10+
11+
//function should cause an error in strict mode
12+
function forbidden()
13+
{
14+
alert("forbiden works");
15+
var arguments = [];
16+
}

no strict.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//function should cause an error in strict mode
2+
function forbidden()
3+
{
4+
alert("forbiden works");
5+
var arguments = [];
6+
}

strict.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//Activating globally strict mode
2+
"use strict";
3+
4+
//The function is not really needed. Its purpose is only to fill the file.
5+
function do_something()
6+
{
7+
alert("do_something works!");
8+
}
9+

0 commit comments

Comments
 (0)