MCPcopy Create free account
hub / github.com/CanadaHonk/shadow / backgroundColor

Method backgroundColor

engine/layout.js:1149–1158  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1147 }
1148
1149 backgroundColor() {
1150 let val = this.css()['background-color'];
1151 if (this.tagName === 'html' && (!val || val === 'Canvas')) {
1152 // try to use body bg color if html bg color is not set (???)
1153 const bodyVal = this.querySelector('body')?.css?.()?.['background-color'];
1154 if (bodyVal) val = bodyVal;
1155 }
1156
1157 return this.colorAbs(val, 'background-color');
1158 }
1159
1160 _image;
1161 async loadImage() {

Callers 2

updateMethod · 0.80
drawMethod · 0.80

Calls 3

cssMethod · 0.95
querySelectorMethod · 0.95
colorAbsMethod · 0.95

Tested by

no test coverage detected