Page 34 - JavaScript
P. 34
Method 2: JSONP 461
Safe cross-origin communication with messages 462
Example of Window communicating with a children frame 462
Chapter 80: Scope 464
Remarks 464
Examples 464
Difference between var and let 464
Global variable declaration 465
Re-declaration 465
Hoisting 466
Closures 466
Private data 467
Immediately-invoked function expressions (IIFE) 468
Hoisting 468
What is hoisting? 468
Limitations of Hoisting 470
Using let in loops instead of var (click handlers example) 471
Method invocation 472
Anonymous invocation 472
Constructor invocation 472
Arrow function invocation 473
Apply and Call syntax and invocation. 473
Bound invocation 475
Chapter 81: Screen 476
Examples 476
Getting the screen resolution 476
Getting the “available” area of the screen 476
Getting color information about the screen 476
Window innerWidth and innerHeight Properties 476
Page width and height 476
Chapter 82: Security issues 478

