mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6c6d024be9 |
@@ -22,6 +22,7 @@ node_modules
|
||||
|
||||
# Extras temp file
|
||||
/tools/owl.js
|
||||
/tools/devtools/build
|
||||
|
||||
release-notes.md
|
||||
|
||||
|
||||
@@ -46,8 +46,6 @@ Here is how the `Navbar` component could be defined, with the `t-slot` directive
|
||||
</div>
|
||||
```
|
||||
|
||||
Note that `t-slot` can only be used on a `<t>` element.
|
||||
|
||||
## Named slots
|
||||
|
||||
Default slots are very useful, but sometimes, we may need more than one slot.
|
||||
|
||||
@@ -798,12 +798,6 @@ function parseTSlot(node: Element, ctx: ParsingContext): AST | null {
|
||||
if (!node.hasAttribute("t-slot")) {
|
||||
return null;
|
||||
}
|
||||
if (node.tagName !== "t") {
|
||||
throw new OwlError(
|
||||
`Directive 't-slot' can only be used on <t> nodes (used on a <${node.tagName}>)`
|
||||
);
|
||||
}
|
||||
|
||||
const name = node.getAttribute("t-slot")!;
|
||||
node.removeAttribute("t-slot");
|
||||
let attrs: Attrs | null = null;
|
||||
|
||||
@@ -1686,12 +1686,6 @@ describe("qweb parser", () => {
|
||||
});
|
||||
});
|
||||
|
||||
test("t-slot on a div tag should throw", async () => {
|
||||
expect(() => parse(`<div t-slot="name"/>`)).toThrowError(
|
||||
"Directive 't-slot' can only be used on <t> nodes (used on a <div>)"
|
||||
);
|
||||
});
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// t-debug
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user