mirror of https://github.com/sveltejs/svelte
				
				
				
			fix SSR spread with boolean attributes (#3797)
	
		
	
				
					
				
			* in SSR, adjust spread with boolean attributes (#2916) * add tests * update changelogpull/3810/head
							parent
							
								
									9f7565cf19
								
							
						
					
					
						commit
						9f48d1a5fd
					
				@ -0,0 +1,27 @@
 | 
				
			|||||||
 | 
					// source: https://html.spec.whatwg.org/multipage/indices.html
 | 
				
			||||||
 | 
					export const boolean_attributes = new Set([
 | 
				
			||||||
 | 
						'allowfullscreen',
 | 
				
			||||||
 | 
						'allowpaymentrequest',
 | 
				
			||||||
 | 
						'async',
 | 
				
			||||||
 | 
						'autofocus',
 | 
				
			||||||
 | 
						'autoplay',
 | 
				
			||||||
 | 
						'checked',
 | 
				
			||||||
 | 
						'controls',
 | 
				
			||||||
 | 
						'default',
 | 
				
			||||||
 | 
						'defer',
 | 
				
			||||||
 | 
						'disabled',
 | 
				
			||||||
 | 
						'formnovalidate',
 | 
				
			||||||
 | 
						'hidden',
 | 
				
			||||||
 | 
						'ismap',
 | 
				
			||||||
 | 
						'loop',
 | 
				
			||||||
 | 
						'multiple',
 | 
				
			||||||
 | 
						'muted',
 | 
				
			||||||
 | 
						'nomodule',
 | 
				
			||||||
 | 
						'novalidate',
 | 
				
			||||||
 | 
						'open',
 | 
				
			||||||
 | 
						'playsinline',
 | 
				
			||||||
 | 
						'readonly',
 | 
				
			||||||
 | 
						'required',
 | 
				
			||||||
 | 
						'reversed',
 | 
				
			||||||
 | 
						'selected'
 | 
				
			||||||
 | 
					]);
 | 
				
			||||||
@ -1 +1,2 @@
 | 
				
			|||||||
<textarea readonly></textarea>
 | 
					<textarea readonly></textarea>
 | 
				
			||||||
 | 
					<textarea autocomplete="no"></textarea>
 | 
				
			||||||
 | 
				
			|||||||
@ -1 +1,2 @@
 | 
				
			|||||||
<textarea readonly></textarea>
 | 
					<textarea readonly></textarea>
 | 
				
			||||||
 | 
					<textarea autocomplete={'no'}></textarea>
 | 
				
			||||||
 | 
				
			|||||||
@ -0,0 +1,2 @@
 | 
				
			|||||||
 | 
					<input readonly>
 | 
				
			||||||
 | 
					<input>
 | 
				
			||||||
@ -0,0 +1,2 @@
 | 
				
			|||||||
 | 
					<input {...{ readonly: 1 }}>
 | 
				
			||||||
 | 
					<input {...{ readonly: 0 }}>
 | 
				
			||||||
					Loading…
					
					
				
		Reference in new issue