File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 11class StyleGetter {
22 private _style = '' ;
33
4- private getStyle = ( ) => fetch ( '/dist/style.css' ) . then ( ( res ) => res . text ( ) ) ;
4+ private getStyle = async ( ) => {
5+ const styleElement : HTMLLinkElement | null = document . querySelector ( '#style' ) ;
6+ let style = '' ;
7+
8+ if ( styleElement ) {
9+ style = await fetch ( styleElement . href ) . then ( ( res ) => res . text ( ) ) ;
10+ }
11+
12+ return style ;
13+ } ;
514
615 /**
716 * get css strings for SVG Image
Original file line number Diff line number Diff line change 44 <meta charset =" UTF-8" >
55 <meta name =" viewport" content =" width=device-width, initial-scale=1" >
66 <title ><% - title %> </title >
7- <link rel =" stylesheet" href =" .. /dist/style.css" >
7+ <link id = " style " rel =" stylesheet" href =" /dist/style.css" >
88 <script >
99 window .enableWebSocket = < %- enableWebSocket % > ;
1010 </script >
11- <script src =" .. /dist/client.js" defer ></script >
11+ <script src =" /dist/client.js" defer ></script >
1212</head >
1313<body >
1414<main >
You can’t perform that action at this time.
0 commit comments