mirror of https://github.com/webpack/webpack.git
				
				
				
			Merge pull request #9431 from mikispag/patch-1
Prefer the IDL 'nonce' property over .getAttribute('nonce')
			
			
This commit is contained in:
		
						commit
						edc12528fd
					
				|  | @ -7,7 +7,8 @@ it("should load script with nonce 'nonce1234'", function(done) { | |||
| 	// if in browser context, test that nonce was added.
 | ||||
| 	if (typeof document !== 'undefined') { | ||||
| 		var script = document.querySelector('script[src="js/chunk-with-nonce.web.js"]'); | ||||
| 		expect(script.getAttribute('nonce')).toBe('nonce1234'); | ||||
| 		var nonce = script.nonce || script.getAttribute('nonce'); | ||||
| 		expect(nonce).toBe('nonce1234'); | ||||
| 	} | ||||
| 	__webpack_nonce__ = undefined; | ||||
| 	done(); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue