markdown 聚合物

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 聚合物相关的知识,希望对你有一定的参考价值。

### Code to prevent this error:
```
polymer-fn.js:43 Uncaught (in promise) DOMException: Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry
    at Polymer
```
#### You just have to add before this line:
```
window.customElements.define('my-app', MyApp);
```

#### This is the code that will solve the problem:
```
const _customElementsDefine = window.customElements.define;
window.customElements.define = function(name, clazz, config) {
  if (!customElements.get(name)) {
    _customElementsDefine.call(window.customElements, name, clazz, config);
  }
};
```
#### This is necessary to import the paper-dropdown-menu
```
import '@polymer/paper-item/paper-item.js';
import '@polymer/paper-listbox/paper-listbox.js';
import '@polymer/paper-dropdown-menu/paper-dropdown-menu.js';
```

以上是关于markdown 聚合物的主要内容,如果未能解决你的问题,请参考以下文章

markdown 聚合物

markdown 聚合物片段

markdown MongoDB的聚合

markdown 字符串分组聚合

markdown 字符串分组聚合

markdown PostPogo聚合通过timebuckets -