-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(engine): issue 990 textContent and innerHTML restrictions #1001
Conversation
assert.logError(`textContent is disallowed in Element unless \`lwc:dom="manual"\` directive is used in the template.`, this as Element); | ||
} | ||
if (this instanceof Element && options.isPortal !== true) { | ||
assert.logError(`textContent is disallowed in Element unless \`lwc:dom="manual"\` directive is used in the template.`, this as Element); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the this as Element
typecasting necessary here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy/paste, but I think we can remove it from this file since the instanceof is sufficient in ts3.x
assert.logError(`nodeValue is disallowed in Element unless \`lwc:dom="manual"\` directive is used in the template.`, this as Element); | ||
} | ||
if (this instanceof Element && options.isPortal !== true) { | ||
assert.logError(`nodeValue is disallowed in Element unless \`lwc:dom="manual"\` directive is used in the template.`, this as Element); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the this as Element
typecasting necessary here?
Benchmark resultsBase commit: lwc-engine-benchmark
|
* test: remove test for duplicate handlers restriction was removed in #1193 * test: enable test for readonly properties * test: enable test for dispatchEvent * test: remove test for removing non-existent listener on custom element * test: test setting innerHTML, outerHTML on host will throw fixed in #1001 * test: enable tests migrated to karma suite * test: more enabled tests * test: revert the suite back to disabled state * test: account for different error message across browsers * test: error message in ie11 is taken care of * fix: isConnected polyfill in IE11 fixes #987 * test: enable tests for #997 and #990 issue Tests for #997 & #990 * test: enable test for iteration fix #1285 * test: adjust error message fix #1285 * test: enable tests that work in native-shadow * test: disable non-composed event tests because of webkit bug WebKit bug - https://bugs.webkit.org/show_bug.cgi?id=206374 * fix: use regex for error message variants
fixes #990 and #991