Comments (4)
test
isn't a valid custom element name. It must contain a dash. Try x-test
.
from core.
I fixed the zip package on x-tags.org.
from core.
Thanks for the suggestions.
I have changed the element to 'x-test' and tested with both the updated ZIP package and source x-tag-core. attributeChanged is still not firing. Anything else I might be missing?
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script type="text/javascript" src="/js/vendor/x-tag-components/x-tag-components.js"></script>
<script type="text/javascript">
xtag.register('x-test', {
'lifecycle': {
created: function(){
console.log('created', this);
},
inserted: function(){
console.log('inserted', this);
},
removed: function(){
console.log('removed', this);
},
attributeChanged: function(){
console.log('attributeChanged', this);
}
}
});
var element = document.createElement('x-test'); // Should log "created"
var body = document.getElementsByTagName('body')[0];
window.setTimeout(function(){
body.appendChild(element); // Should log "inserted"
window.setTimeout(function(){
element.setAttribute('test', 'value') // ERROR: Should log "attributeChanged"
window.setTimeout(function(){
body.removeChild(element) // Should log "removed"
}, 1000)
}, 1000)
},1000);
</script>
</body>
</html>
from core.
Is this still an issue? We have tests in the core library that show that attributeChanged is firing. Can you get the latest code and try again?
from core.
Related Issues (20)
- this.innerHTML in V2 throws recursion error. HOT 33
- enhancement question HOT 4
- this.outerHTML is undefined HOT 5
- Setter on attr camel cases doesn't set the proper dashed attribute value. HOT 6
- Using setAttribute is unstable HOT 3
- Is this project still supported? Are any additional releases planned? HOT 1
- template attr from last commit
- v2 docs Pseudos versus Jasmine tests
- include information about ie9 -ie11 compat HOT 3
- experimenting with type renders
- Ability to define placeholder for inner HTML HOT 3
- V1 lifecycle compatibility HOT 4
- Website :: Clock not operating properly on safari mobile HOT 4
- IDEA: V1 FINAL PATCH HOT 4
- XTagElement is not defined HOT 3
- Issues @ x-tag.github.io/docs
- package.json needs to be updated HOT 2
- lit-element? I'm confused :/
- Migration guide || equivalents of inserted/...? HOT 1
- Status of project HOT 3
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 core.