Ignore HtmlReporter's createElement and createTextNode options

Injected DOM wrappers were a nice idea in theory but everyone just passes
wrappers around document.createElement/document.createTextNode. That
includes HtmlReporter's unit tests and karma-jasmine-html-reporter, the
only known 5.x-compatible library that constructs an HtmlReporter.
This commit is contained in:
Steve Gravrock
2025-10-07 19:34:23 -07:00
parent 10ad40357a
commit de44e909f2
6 changed files with 46 additions and 346 deletions

View File

@@ -104,10 +104,7 @@ jasmineRequire.HtmlReporter = function(j$) {
this.#env = options.env;
this.#getContainer = options.getContainer;
this.#domContext = new j$.private.DomContext({
createElement: options.createElement,
createTextNode: options.createTextNode
});
this.#domContext = new j$.private.DomContext();
this.#navigateWithNewParam =
options.navigateWithNewParam || function() {};
this.#urlBuilder = new UrlBuilder(
@@ -852,7 +849,7 @@ jasmineRequire.HtmlReporter = function(j$) {
while (suite && suite.parent) {
wrapper.insertBefore(
this.#domContext.createTextNode(' > '),
document.createTextNode(' > '),
wrapper.firstChild
);
suiteLink = this.#domContext.create(