Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Mititiuc <webdevcat@proton.me>2024-05-24 15:59:17 -0700
committerCatalin Mititiuc <webdevcat@proton.me>2024-05-24 15:59:17 -0700
commita80728f16f90616d93dcc9ed932528b35e2ef62d (patch)
tree3155abf47790f01c8fe87e374f30926cdd763b16 /src/index.js
parentd729079cdf63a4382e3e3225295784124e0a4d5d (diff)
WIP: mock selenium response
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/index.js b/src/index.js
index 604f877..8b24625 100644
--- a/src/index.js
+++ b/src/index.js
@@ -93,28 +93,28 @@ function roll(die) {
function load() {
const svg = this.contentDocument.querySelector('svg'),
startLocs = svg.querySelector('.start-locations')
- // , scriptEl = this.contentDocument.querySelector('script')
+ , scriptEl = this.contentDocument.querySelector('script')
;
- // const linkEl = document.createElement('link');
- // linkEl.setAttribute('xmlns', 'http://www.w3.org/1999/xhtml');
- // linkEl.setAttribute('rel', 'stylesheet');
- // linkEl.setAttribute('href', 'http://localhost:8080/assets/css/map.css');
- // linkEl.setAttribute('type', 'text/css');
+ const linkEl = document.createElement('link');
+ linkEl.setAttribute('xmlns', 'http://www.w3.org/1999/xhtml');
+ linkEl.setAttribute('rel', 'stylesheet');
+ linkEl.setAttribute('href', '../../assets/css/map.css');
+ linkEl.setAttribute('type', 'text/css');
- // linkEl.onload = function (e) {
- // console.log('map.css loaded');
+ linkEl.onload = function (e) {
+ console.log('map.css loaded');
- // if (scriptEl) {
- // scriptEl.onload = function () {
- // console.log('map.js loaded');
+ if (scriptEl) {
+ scriptEl.onload = function () {
+ console.log('map.js loaded');
- // };
- // scriptEl.setAttribute('href', 'http://localhost:8080/map.js');
- // }
- // };
+ };
+ scriptEl.setAttribute('href', '../../map.js');
+ }
+ };
- // svg.prepend(linkEl);
+ svg.prepend(linkEl);
this.style.opacity = 1;
mapPlaceholder.style.opacity = 0;