File tree 7 files changed +86
-0
lines changed
7 files changed +86
-0
lines changed Original file line number Diff line number Diff line change
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 >
Original file line number Diff line number Diff line change
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
+
Original file line number Diff line number Diff line change
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 >
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
1
+ //function should cause an error in strict mode
2
+ function forbidden ( )
3
+ {
4
+ alert ( "forbiden works" ) ;
5
+ var arguments = [ ] ;
6
+ }
Original file line number Diff line number Diff line change
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
+
You can’t perform that action at this time.
0 commit comments