Merge pull request 'Pollyfill for Promise.withResolvers' (#31) from BordedDev/snek:feat/pollyfill-promise.withResolvers into main
Reviewed-on: https://molodetz.nl/retoor/snek/pulls/31 Reviewed-by: retoor <retoor@noreply@molodetz.nl>
This commit is contained in:
		
						commit
						825ece4e78
					
				
							
								
								
									
										8
									
								
								src/snek/static/polyfills/Promise.withResolvers.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								src/snek/static/polyfills/Promise.withResolvers.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,8 @@
 | 
				
			|||||||
 | 
					Promise.withResolvers = Promise.withResolvers || function() {
 | 
				
			||||||
 | 
					    let resolve, reject;
 | 
				
			||||||
 | 
					    let promise = new Promise((res, rej) => {
 | 
				
			||||||
 | 
					        resolve = res;
 | 
				
			||||||
 | 
					        reject = rej;
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					    return { promise, resolve, reject };
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -6,6 +6,7 @@
 | 
				
			|||||||
    <link rel="manifest" href="/manifest.json" />
 | 
					    <link rel="manifest" href="/manifest.json" />
 | 
				
			||||||
  <title>Snek</title>
 | 
					  <title>Snek</title>
 | 
				
			||||||
  <style>{{highlight_styles}}</style>
 | 
					  <style>{{highlight_styles}}</style>
 | 
				
			||||||
 | 
					  <script src="/polyfills/Promise.withResolvers.js" type="module"></script>
 | 
				
			||||||
  <!-- 
 | 
					  <!-- 
 | 
				
			||||||
  <script src="/push.js"></script>
 | 
					  <script src="/push.js"></script>
 | 
				
			||||||
  -->
 | 
					  -->
 | 
				
			||||||
 | 
				
			|||||||
@ -12,7 +12,8 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    <title>{% block title %}Snek chat by Molodetz{% endblock %}</title>
 | 
					    <title>{% block title %}Snek chat by Molodetz{% endblock %}</title>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <script src="/app.js"  type="module"></script>
 | 
					    <script src="/polyfills/Promise.withResolvers.js" type="module"></script>
 | 
				
			||||||
 | 
					    <script src="/app.js" type="module"></script>
 | 
				
			||||||
    <script src="/message-list.js" type="module"></script>
 | 
					    <script src="/message-list.js" type="module"></script>
 | 
				
			||||||
    <style>{{ highlight_styles }}</style>
 | 
					    <style>{{ highlight_styles }}</style>
 | 
				
			||||||
    <link rel="stylesheet" href="/style.css">
 | 
					    <link rel="stylesheet" href="/style.css">
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user