react-new-window icon indicating copy to clipboard operation
react-new-window copied to clipboard

Missing script sources inside <head /> in the new window

Open ptt-bs23 opened this issue 4 years ago • 0 comments

I have a custom component (a DICOM Viewer) which I am trying to open in a new window. After integrating the module with my code, I found that my component is showing partially and partially broken. After checking the console error, I noticed that the new window doesn't have the source files, which I have in my main window and the errors are related. I have looked up for this solution but didn't get any.

Here is my code chunk

{this.state.dwvModalIsOpen ? (
    <NewWindow>
		<div>
			<DwvComponent fileURL={xrayUrl} />
		</div>
    </NewWindow>
) : ('')}

The source missing in the header of the new window:

<script src="https://unpkg.com/[email protected]/konva.js"></script>
   <script src="https://unpkg.com/magic-wand-tool@latest/dist/magic-wand.min.js"></script>
  <script type="text/javascript" src="https://raw.githubusercontent.com/ivmartel/dwv/develop/src/gui/style.js"></script>
  <script type="text/javascript" src="https://raw.githubusercontent.com/ivmartel/dwv/develop/src/gui/layer.js"></script>
  <script type="text/javascript" src="https://raw.githubusercontent.com/ivmartel/dwv/develop/src/gui/generic.js"></script>
  <script type="text/javascript" src="https://raw.githubusercontent.com/ivmartel/dwv/develop/dist/dwv.min.js"></script>
  <script type="text/javascript" src="https://raw.githubusercontent.com/ivmartel/dwv/develop/decoders/dwv/decode-rle.js"></script>
  <script type="text/javascript" src="https://raw.githubusercontent.com/ivmartel/dwv/develop/decoders/dwv/rle.js"></script>
  <script type="text/javascript" src="/dwv/dist/dwv.min.js"></script>

ptt-bs23 avatar Jun 30 '20 13:06 ptt-bs23