@lwc/engine-core 3.1.0 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,7 +20,7 @@ export interface LightningElementConstructor {
20
20
  shadowSupportMode?: ShadowSupportMode;
21
21
  stylesheets: TemplateStylesheetFactories;
22
22
  }
23
- type HTMLElementTheGoodParts = Pick<Object, 'toString'> & Pick<HTMLElement, 'accessKey' | 'addEventListener' | 'children' | 'childNodes' | 'classList' | 'dir' | 'dispatchEvent' | 'draggable' | 'firstChild' | 'firstElementChild' | 'getAttribute' | 'getAttributeNS' | 'getBoundingClientRect' | 'getElementsByClassName' | 'getElementsByTagName' | 'hasAttribute' | 'hasAttributeNS' | 'hidden' | 'id' | 'isConnected' | 'lang' | 'lastChild' | 'lastElementChild' | 'ownerDocument' | 'querySelector' | 'querySelectorAll' | 'removeAttribute' | 'removeAttributeNS' | 'removeEventListener' | 'setAttribute' | 'setAttributeNS' | 'spellcheck' | 'tabIndex' | 'title'>;
23
+ type HTMLElementTheGoodParts = Pick<Object, 'toString'> & Pick<HTMLElement, 'accessKey' | 'addEventListener' | 'children' | 'childNodes' | 'classList' | 'dir' | 'dispatchEvent' | 'draggable' | 'firstChild' | 'firstElementChild' | 'getAttribute' | 'getAttributeNS' | 'getBoundingClientRect' | 'getElementsByClassName' | 'getElementsByTagName' | 'hasAttribute' | 'hasAttributeNS' | 'hidden' | 'id' | 'isConnected' | 'lang' | 'lastChild' | 'lastElementChild' | 'ownerDocument' | 'querySelector' | 'querySelectorAll' | 'removeAttribute' | 'removeAttributeNS' | 'removeEventListener' | 'setAttribute' | 'setAttributeNS' | 'spellcheck' | 'tabIndex' | 'tagName' | 'title'>;
24
24
  type RefNodes = {
25
25
  [name: string]: Element;
26
26
  };
@@ -38,6 +38,7 @@ export interface RendererAPI {
38
38
  getFirstElementChild: (element: E) => E | null;
39
39
  getLastChild: (element: E) => N | null;
40
40
  getLastElementChild: (element: E) => E | null;
41
+ getTagName: (element: E) => string;
41
42
  isConnected: (node: N) => boolean;
42
43
  insertStylesheet: (content: string, target?: ShadowRoot) => void;
43
44
  assertInstanceOfHTMLElement: (elm: any, msg: string) => void;
package/dist/index.cjs.js CHANGED
@@ -1692,6 +1692,10 @@ LightningElement.prototype = {
1692
1692
  }
1693
1693
  return renderer.ownerDocument(vm.elm);
1694
1694
  },
1695
+ get tagName() {
1696
+ const { elm, renderer } = getAssociatedVM(this);
1697
+ return renderer.getTagName(elm);
1698
+ },
1695
1699
  render() {
1696
1700
  const vm = getAssociatedVM(this);
1697
1701
  return vm.def.template;
@@ -3153,7 +3157,8 @@ function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
3153
3157
  if (lwcRuntimeFlags.DISABLE_LIGHT_DOM_UNSCOPED_CSS &&
3154
3158
  !isScopedCss &&
3155
3159
  vm.renderMode === 0 /* RenderMode.Light */) {
3156
- logError('Unscoped CSS is not supported in Light DOM. Please use scoped CSS (*.scoped.css) instead of unscoped CSS (*.css).');
3160
+ logError('Unscoped CSS is not supported in Light DOM in this environment. Please use scoped CSS ' +
3161
+ '(*.scoped.css) instead of unscoped CSS (*.css). See also: https://sfdc.co/scoped-styles-light-dom');
3157
3162
  continue;
3158
3163
  }
3159
3164
  // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
@@ -6925,5 +6930,5 @@ exports.swapTemplate = swapTemplate;
6925
6930
  exports.track = track;
6926
6931
  exports.unwrap = unwrap;
6927
6932
  exports.wire = wire;
6928
- /** version: 3.1.0 */
6933
+ /** version: 3.1.2 */
6929
6934
  //# sourceMappingURL=index.cjs.js.map