WIP: mock selenium response

This commit is contained in:
2025-06-16 22:41:31 -07:00
parent 9f4ff16638
commit de1b9e2689
17 changed files with 467 additions and 186 deletions

View File

@@ -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;