Comments (6)
AFAIK it works, although I haven't tried it.
from delite.
Although I'm not sure it is related to the parser, it doesn't work when there are multiple instances declared with a self-closing tag or an instance declared with a self-closing tag followed by an instance declared with a closing-tag:
- Multiple self-closing tag instances:
<d-self-closing-tag id="instance1"/>
<d-self-closing-tag id="instance2"/>
- Self-closing tag followed by closing-tag instance:
<d-self-closing-tag id="instance1"/>
<d-self-closing-tag id="instance2"></d-self-closing-tag>
Assuming that buidRendering creates a div child element, in both case the generated DOM structure is:
<d-self-closing-tag id="instance1">
<d-self-closing-tag id="instance2">
<div></div>
</d-self-closing-tag>
<div></div>
</d-self-closing-tag>
instead of:
<d-self-closing-tag id="instance1">
<div></div>
</d-self-closing-tag>
<d-self-closing-tag id="instance2">
<div></div>
</d-self-closing-tag>
I pushed a simple test case in branch https://github.com/seb-pereira/dui/tree/SelfClosingTag
https://github.com/seb-pereira/dui/blob/SelfClosingTag/SelfClosingTag.js
https://github.com/seb-pereira/dui/blob/SelfClosingTag/tests/test_SelfClosingTag.html
from delite.
OK, and which browser is it failing on for you?
from delite.
Tested on desktop browsers FF 26 and Chrome 31.
from delite.
OK... I'll look but probably it's just a browser limitation that we can't do anything about. You can try checking what the DOM looks like before the parser is called, and see if it's accurate or corrupt.
from delite.
I tested this and it's a problem with the browser(s). The browsers interpret markup like:
<d-self-closing-tag id="instance1"/>
<d-self-closing-tag id="instance2"></d-self-closing-tag>
as a DOM structure of:
<d-self-closing-tag id="instance1">
<d-self-closing-tag id="instance2">
</d-self-closing-tag>
</d-self-closing-tag>
This happens even when you don't run the parser, even when dui/delite is not even included on the page.
Therefore, AFAICT we just can't support empty elements. Too bad.
from delite.
Related Issues (20)
- Don't set blank attribute values
- HasDropDown: SPACE key doesn't open dropdown when JAWS is running
- HasDropDown: add flag for popup type
- Upgrade to DCL V2 HOT 7
- HasDropDown: DOM node leak, old popups not always destroyed.
- FormWidget: caret can jump to end of text while typing
- delite/popup: automatically detect popup size change
- Centered popups disappear on resize in RTL mode
- Viewport: replace polling HOT 1
- element resize observer HOT 4
- delite/popup: replace polling
- Fix iOS focus problems when dialog input element is clicked
- Close dropdown when anchor node scrolled out of view
- delite not working in Safari 12.1 HOT 2
- delite/popup: support scrub gesture to close popup HOT 1
- JAWS browse mode broken in dropdown dialogs
- KeyNav: let handler choose to not handle key
- Shift-tabbing into KeyNav container from browser address bar broken
- ES6 module format conversion
- lit-html preparation and conversion
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 delite.