Compare commits

..

1 Commits

Author SHA1 Message Date
Géry Debongnie 6c6d024be9 [IMP] .gitignore: ignore tools/devtools build folder
Otherwise, it is annoying to have build files that should never be
committed anyway
2023-03-05 07:49:25 +01:00
4 changed files with 1 additions and 14 deletions
+1
View File
@@ -22,6 +22,7 @@ node_modules
# Extras temp file
/tools/owl.js
/tools/devtools/build
release-notes.md
-2
View File
@@ -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.
-6
View File
@@ -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;
-6
View File
@@ -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
// ---------------------------------------------------------------------------