Clean up
This commit is contained in:
parent
70a8125fa8
commit
0c3fca6a21
|
@ -48,7 +48,7 @@ function recurseElement(page: Page, el: Element) {
|
||||||
}
|
}
|
||||||
if (["audio", "video", "img", "source"].includes(el.name)) {
|
if (["audio", "video", "img", "source"].includes(el.name)) {
|
||||||
if (el.attribs.src) {
|
if (el.attribs.src) {
|
||||||
checkUrl(report, rawHtml, el, el.attribs.src);
|
checkUrl(page, el, el.attribs.src);
|
||||||
} else {
|
} else {
|
||||||
report.things.push({
|
report.things.push({
|
||||||
type: "media-no-src",
|
type: "media-no-src",
|
||||||
|
@ -64,7 +64,7 @@ function recurseElement(page: Page, el: Element) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkUrl(report: Report, rawHtml: string, el: Element, url: string) {
|
function checkUrl({ report, rawHtml }: Page, el: Element, url: string) {
|
||||||
if (isHttp(url)) {
|
if (isHttp(url)) {
|
||||||
report.things.push({
|
report.things.push({
|
||||||
type: "media-http",
|
type: "media-http",
|
||||||
|
|
Loading…
Reference in a new issue