Update boot.js
Add note
This commit is contained in:
		
							parent
							
								
									6eb26f5a21
								
							
						
					
					
						commit
						5ed7f10cd6
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		|  | @ -11,6 +11,12 @@ | ||||||
| 
 | 
 | ||||||
| 'use strict'; | 'use strict'; | ||||||
| 
 | 
 | ||||||
|  | // Chromeで確認したことなのですが、constやletを用いたとしても
 | ||||||
|  | // グローバルなスコープで定数/変数を定義するとwindowのプロパティ
 | ||||||
|  | // としてそれがアクセスできるようになる訳ではありませんが、普通に
 | ||||||
|  | // コンソールから定数/変数名を入力するとアクセスできてしまいます。
 | ||||||
|  | // ブロックに入れてスコープをグローバルでなくするとそれが防げます
 | ||||||
|  | // (Chrome以外のブラウザでは検証していません)
 | ||||||
| { | { | ||||||
| 	// Get the current url information
 | 	// Get the current url information
 | ||||||
| 	const url = new URL(location.href); | 	const url = new URL(location.href); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue