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';
```

#### And you need this package
```
npm install web-animations-js --save
```

#### And make sure to add the animations this way:
```
<script src="node_modules/web-animations-js/web-animations-next-lite.min.js"></script>
```
Before loading your application


Gitlab runner in .gitlab-ci.yml
```
she-profiles-backend:
  script:
  - docker run -v test:/etc/newman -t postman/newman_ubuntu1404 run "https://www.getpostman.com/collections/e893b0ef2d69964f9661"
  - polymer build
```

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

markdown 聚合物的角度样式指南

markdown 聚合物

VS Code配置markdown代码片段

VS Code配置markdown代码片段

markdown 正则表达式模式片段

markdown moto片段