Comments (7)
Very simple suggestion is to declare all tag-functions for the Tag
class and discard *Content.
We'll have exactly one SPAN
class and exactly one Tag.span
function.
Pros:
- less code to generate
- simpler implementation, much easier to lean
- solves all the problems above
- minimal library, which does one thing (helps to write html from Kotlin)
Cons:
- hierarchy check still won't work
from kotlinx.html.
You can use FlowContent
or HtmlBlockTag
for that purpose. Just need to be documented
from kotlinx.html.
Just faced the same problem.
Wanted to create an universal helper that would be working both with div
s and span
s.
from kotlinx.html.
It is going to be fixed with upcoming release (will be aligned to kotlin 1.1 release)
from kotlinx.html.
@cy6erGn0m Just tested it. And yes, version 0.6+ works very well. Seems like you've completely refactored the inheritance architecture of the library. Thank you!
from kotlinx.html.
@kosiakk can we close it? Are your use-cases satisfied now?
from kotlinx.html.
Yes, FlowContent
works for me now, thank you!
from kotlinx.html.
Related Issues (20)
- Cannot disable escaping of `&` in an attribute value HOT 2
- iOSARM64 artifact for 0.9.1 missing from Maven Central HOT 5
- A confusion with types for `Event`
- Options for generating the HTML Code
- Escaping attribute value characters break Unicode codes
- HTML5 <u> tag is missing
- Can't Download kotlinx-html-jvm from https://maven.pkg.jetbrains.space HOT 3
- Please adopt html to kotlinx.html Intellij plugin HOT 1
- Improve the documentation on custom tags
- Cannot put a div inside a th
- SAXParseException when trying to add an unclosed, raw `<link>` tag into a `head { ... }` block HOT 4
- Please make the streaming consumer easier to work with HOT 2
- htmlx
- Missing release(s), e.g. 0.11 HOT 2
- Adjust readme file to replace kotlin-js with wasm
- Add all aria attributes
- @Preview plugin for Intellij [feature]
- Rename TagConsumer.finalize()
- `attributes["hx-on::after-request"]` does not preserve double colon HOT 3
- Support path tag
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 kotlinx.html.