Comments (15)
@wzrdtales thanks for the issue. This is likely because it's configured to use shadowdom globally, which means every component has shadow dom turned on by default. This causes a conflict with containerless since there's no host to attach shadow to. I guess in your case you want to disable the shadow dom for this particular component to enable containerless for it. This is tracked in #1772
Any thoughts @3cp , maybe temporarily we can enable a way to disable shadow dom per component.
from aurelia.
thanks for your response. I tried already deactivating it with useshadowdom(false), but it still throws the same error despite it
from aurelia.
I added @useShadowDOM(false)
actually to both components, the main that includes the sub component and the subcomponent itself. Error stays unfortunately the same. Did something change and this disabling doesn't work anymore?
from aurelia.
sorry correction @bigopon
The error changes, to this one instead:
Failed to execute 'attachShadow' on 'Element': The provided value is not of type 'ShadowRootInit'.
from aurelia.
Correction again, only if I apply it to the main component, if only to the subcomponent it stays AUR0501
from aurelia.
I tried as-element
as well which is broken with the same error Failed to execute 'attachShadow' on 'Element': The provided value is not of type 'ShadowRootInit'.
from aurelia.
The only thing that yet did not throw an error, but instead the element just disappears and does not get rendered anymore was
@customElement({
name: 'instance-table-item',
containerless: true
})
from aurelia.
In template, we have a way to optionally turn on shadow dom, or override the mode.
The simplest solution would be extend that <use-shadow-dom>
tag to add an attribute to turn it off.
from aurelia.
But isn't this the same as @useShadowDom(false)
which didn't work? Or does this differ?
from aurelia.
I was only answering @bigopon's question about the template feature. Not sure what's the cause of this particular issue.
Yes, @useShadowDom(false)
sounds doing the same.
from aurelia.
ok, then yeah, this wont solve it unfortunately then. I tried that same error as stated before and even more weird errors when I go down the chain Failed to execute 'attachShadow' on 'Element': The provided value is not of type 'ShadowRootInit'.
from aurelia.
I found a solution #1772
I just wondered, here in this issue it claims useShadowDom(null)
, while your documentation says false
. I just tested null
, and with that it starts working oO
from aurelia.
But my issue was that out of the table
element, the container got thrown out. Even with containerless
it still ends up outside the table
tag.
from aurelia.
exchanging the same with
<tbody
class="text-sm"
repeat.for="order of orders"
order.bind="order"
key.bind="order.id"
value.bind="order.id"
as-element="instance-table-item"
></tbody>
now works, so somehow aurelia seems to early output to the browser the original container name and the browser throws it out of the table structure.
from aurelia.
AFAIK, it is a known phenomenon with <table>
. The schema of the table and what elements are permitted to be nested inside it is very tightly defined (refer to the permitted elements for <table>
in the MDN docs).
I am closing this for now, as it seems to me it is a not an Aurelia-issue and that a working solution is found by the OP anyway. If I am mistaken, feel free to reopen.
from aurelia.
Related Issues (20)
- Vite plugin for aurelia 1.x? HOT 4
- Router load attribute: broken when using id & parameters.bind HOT 7
- Injecting IHttpClient error after beta 11 update
- Router swallows DI errors HOT 7
- Restrict behavior of custom attribute single value binding and primary bindable HOT 8
- Tweak aurelia package reexports HOT 9
- Validation Package - Email validation HOT 7
- Replacing view factory containers
- Vite load issue. HOT 2
- Define `ts-jest` config under `globals` is deprecated HOT 2
- 2.0.0-beta.15 - using @inject is throwing errors HOT 3
- CSS modules support for Vite HOT 10
- [DEV:aurelia] Error: AUR0153: Element has already been registered HOT 8
- Variables getting removed from production bundle HOT 11
- [RFC] synchronous vs asynchronous binding system for Aurelia 2 HOT 9
- 2.0.0-beta.12 - Custom elements instances are now different HOT 10
- [feature request] ability to typecheck template
- RFC: Enhancements for Overriding Registrations in Aurelia DI Container HOT 5
- bindable decorator should not be giving a runtime error HOT 26
- Resource definitions for the subclassed resource overrides definitions of the superclass resource
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 aurelia.