Skip to content

Commit

Permalink
fix(ssr): remove dev-only accessor warnings (#5135)
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanlawson authored Jan 21, 2025
1 parent a081d0d commit 89198db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ export function HTMLBridgeElementFactory(
const descriptors: PropertyDescriptorMap = create(null);

// present a hint message so that developers are aware that they have not decorated property with @api
if (process.env.NODE_ENV !== 'production') {
// Note that we also don't do this in SSR because we cannot sniff for what props are declared on
// HTMLElementPrototype, and it seems not worth it to have these dev-only warnings there, since
// an `in` check could mistakenly assume that a prop is declared on a LightningElement prototype.
if (process.env.NODE_ENV !== 'production' && process.env.IS_BROWSER) {
// TODO [#3761]: enable for components that don't extend from LightningElement
if (!isUndefined(proto) && !isNull(proto) && !hasCustomSuperClass) {
const nonPublicPropertiesToWarnOn = new Set(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<x-component>
<template shadowrootmode="open">
<x-child aria-activedescendant="foo" aria-atomic="foo" aria-autocomplete="foo" aria-busy="foo" aria-checked="foo" aria-colcount="foo" aria-colindex="foo" aria-colspan="foo" aria-controls="foo" aria-current="foo" aria-describedby="foo" aria-details="foo" aria-disabled="foo" aria-errormessage="foo" aria-expanded="foo" aria-flowto="foo" aria-haspopup="foo" aria-hidden="foo" aria-invalid="foo" aria-keyshortcuts="foo" aria-label="foo" aria-labelledby="foo" aria-level="foo" aria-live="foo" aria-modal="foo" aria-multiline="foo" aria-multiselectable="foo" aria-orientation="foo" aria-owns="foo" aria-placeholder="foo" aria-posinset="foo" aria-pressed="foo" aria-readonly="foo" aria-relevant="foo" aria-required="foo" aria-roledescription="foo" aria-rowcount="foo" aria-rowindex="foo" aria-rowspan="foo" aria-selected="foo" aria-setsize="foo" aria-sort="foo" aria-valuemax="foo" aria-valuemin="foo" aria-valuenow="foo" aria-valuetext="foo" exportparts="foo" role="foo">
<x-child accesskey="foo" aria-activedescendant="foo" aria-atomic="foo" aria-autocomplete="foo" aria-busy="foo" aria-checked="foo" aria-colcount="foo" aria-colindex="foo" aria-colspan="foo" aria-controls="foo" aria-current="foo" aria-describedby="foo" aria-details="foo" aria-disabled="foo" aria-errormessage="foo" aria-expanded="foo" aria-flowto="foo" aria-haspopup="foo" aria-hidden="foo" aria-invalid="foo" aria-keyshortcuts="foo" aria-label="foo" aria-labelledby="foo" aria-level="foo" aria-live="foo" aria-modal="foo" aria-multiline="foo" aria-multiselectable="foo" aria-orientation="foo" aria-owns="foo" aria-placeholder="foo" aria-posinset="foo" aria-pressed="foo" aria-readonly="foo" aria-relevant="foo" aria-required="foo" aria-roledescription="foo" aria-rowcount="foo" aria-rowindex="foo" aria-rowspan="foo" aria-selected="foo" aria-setsize="foo" aria-sort="foo" aria-valuemax="foo" aria-valuemin="foo" aria-valuenow="foo" aria-valuetext="foo" dir="foo" draggable="foo" exportparts="foo" id="foo" lang="foo" role="foo" spellcheck="foo" tabindex="foo" title="foo">
<template shadowrootmode="open">
<span>
accessKey:
Expand Down

0 comments on commit 89198db

Please sign in to comment.