Comments (12)
Have you defined the element before creating one?
On Friday, 26 August 2016, Dmitry Vibe [email protected] wrote:
Привет!
Если элемент сперва использован в разметке, а затем (ниже) определён,
происходит ошибка: https://yadi.sk/i/_vIUE9MjuWRNH . Если поменять
местами -- ошибка исчезает.
v1.0.7, в 0.5.4 её не было.
Спасибо.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#69,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFO9Qf5mXO7mmpUr_uWJx1J6JO9F5Q4ks5qjt06gaJpZM4JuCFV
.
from document-register-element.
Conversely:
from document-register-element.
I don't know what your library does, but if it overloads the constructor after definition then we have a problem. If not, I need to find time to dig into your library code, unless you find a way to reproduce the problem using only JS because my tests show green light for similar scenarios.
http://webreflection.github.io/document-register-element/test/
from document-register-element.
Translated by google:
I made a working example in a separate branch: https://github.com/Riim/Rionite/tree/update-document-register-element
For run:
> git clone https://github.com/Riim/Rionite.git -b update-document-register-element
> cd Rionite
> npm i
open in browser examples/SimpleCounter.html or examples/TodoApp.html
Everything works, but this error in the console.
I'm also a little change your polyfill: https://github.com/Riim/Rionite/blob/update-document-register-element/polyfills/document-register-element.max.js#L921 .
Unfortunately my English not enough to explain why I do, but without this change TodoApp breaks down and with debugging (after removing changes) you will be able to understand how it happens and that change is definitely needed.
For rebuild:
> npm run build
Original:
Я сделал рабочий пример отдельной веткой: https://github.com/Riim/Rionite/tree/update-document-register-element
Для запуска:
> git clone https://github.com/Riim/Rionite.git -b update-document-register-element
> cd Rionite
> npm i
open in browser examples/SimpleCounter.html or examples/TodoApp.html
Всё работает, но в консоли эта ошибка.
Так же я немного изменяю ваш полифил: https://github.com/Riim/Rionite/blob/update-document-register-element/polyfills/document-register-element.max.js#L921 . К сожалению моего английского не хватило что бы объяснить зачем я так делаю, но без этого изменения TodoApp ломается и подебажив (предварительно убрав изменения) вы сможете понять как это происходит и что изменение определённо нужное.
Для пересборки:
> npm run build
from document-register-element.
I forgot about "self", with him there is no error.
Sorry to disturb you.
from document-register-element.
Ошибка происходит в 55.0.2859.0 canary (64-bit) .
from document-register-element.
which version?
from document-register-element.
1.0.9
from document-register-element.
In following browsers all is well:
Chrome 52.0.2743.116 (64-bit)
Safary 9.1.1 (11601.6.17)
Opera 39.0.2256.71
Firefox 48.0.1
For repeating:
> git clone https://github.com/Riim/opal-components
> cd opal-components && npm i
open in browser examples.html
from document-register-element.
can you try 1.0.10 ?
from document-register-element.
test page here: http://webreflection.github.io/document-register-element/test/
from document-register-element.
Error has disappeared, thank you.
from document-register-element.
Related Issues (20)
- LifeCycle events order of nested custom elements inconsistent across Chrome and Firefox HOT 18
- Built-in elements don't work in Firefox HOT 6
- TypeError: new.target does not define a custom element HOT 3
- document.registerElement is deprecated and will be removed in M73 HOT 3
- Post-install script slowness HOT 3
- appreciate your feedback for custom element diagram HOT 8
- [Uncaught DOMException: Failed to execute 'registerElement' on 'Document'] when used in Chrome Extension HOT 16
- Functions are not evaluated in connectedCallback HOT 1
- `this` reference in contructor broken HOT 14
- Multiple instances of the polyfill leads to unexpected behaviour HOT 1
- error ""Failed to construct 'HTMLElement': Please use the 'new' operator"" when using with Angular/elements 8.2.0 HOT 2
- Refreshing a document inside an iframe which loads d-r-e breaks the polyfill and leaves document.createElement as undefined HOT 15
- `attributeChangedCallback()` bound value is invalid HOT 15
- Add DRE to Polyfill.io service HOT 1
- [QUESTION] Unable to get property '_isMounted' of undefiened. HOT 1
- TypeError - Object doesn't support property or method 'registerElement' HOT 3
- Time to compare again? (webcompents/custom-elements) HOT 2
- Polyfill does not seem to be working in IE 11 HOT 6
- postinstall fails in noexec enviornment HOT 1
- We unable to install latest version @1.14.7 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from document-register-element.