refactor(ivy): use comment nodes to mark view containers (#24346)
PR Close #24346
This commit is contained in:
@ -32,11 +32,7 @@ export abstract class BaseFixture {
|
||||
/**
|
||||
* Current state of rendered HTML.
|
||||
*/
|
||||
get html(): string {
|
||||
return (this.hostElement as any as Element)
|
||||
.innerHTML.replace(/ style=""/g, '')
|
||||
.replace(/ class=""/g, '');
|
||||
}
|
||||
get html(): string { return toHtml(this.hostElement as any as Element); }
|
||||
}
|
||||
|
||||
function noop() {}
|
||||
@ -223,9 +219,10 @@ export function toHtml<T>(componentOrElement: T | RElement): string {
|
||||
} else {
|
||||
return stringifyElement(componentOrElement)
|
||||
.replace(/^<div host="">/, '')
|
||||
.replace(/^<div fixture="mark">/, '')
|
||||
.replace(/<\/div>$/, '')
|
||||
.replace(' style=""', '')
|
||||
.replace(/<!--[\w]*-->/g, '');
|
||||
.replace(/<!--container-->/g, '');
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user