Merge remote-tracking branch 'upstream/master' into nonself-event-modifier

pull/9029/head
Ben McCann 3 years ago
commit 00e48961a3

@ -0,0 +1,5 @@
---
"svelte": patch
---
fix: Add data-* to svg attributes

@ -113,11 +113,12 @@ Text can also contain JavaScript expressions:
> If you're using a regular expression (`RegExp`) [literal notation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#literal_notation_and_constructor), you'll need to wrap it in parentheses.
<!-- prettier-ignore -->
```svelte
<h1>Hello {name}!</h1>
<p>{a} + {b} = {a + b}.</p>
<div>{/^[A-Za-z ]+$/.test(value) ? x : y}</div>
<div>{(/^[A-Za-z ]+$/).test(value) ? x : y}</div>
```
## Comments

@ -1451,6 +1451,9 @@ export interface SVGAttributes<T extends EventTarget> extends AriaAttributes, DO
yChannelSelector?: string | undefined | null;
z?: number | string | undefined | null;
zoomAndPan?: string | undefined | null;
// allow any data- attribute
[key: `data-${string}`]: any;
}
export interface HTMLWebViewAttributes extends HTMLAttributes<HTMLElement> {

@ -531,7 +531,6 @@ export default class Element extends Node {
this.name === 'option' ||
this.is_dynamic_element ||
this.tag_expr.dynamic_dependencies().length ||
this.is_dynamic_element ||
component.compile_options.dev
) {
this.parent.cannot_use_innerhtml(); // need to use add_location

@ -100,7 +100,7 @@ export function show_output(cwd, options = {}) {
});
}
const svelte_path = fileURLToPath(new URL('..', import.meta.url)).replace(/\\/g, '/');
const svelte_path = fileURLToPath(new URL('..', import.meta.url).href).replace(/\\/g, '/');
const AsyncFunction = /** @type {typeof Function} */ (async function () {}.constructor);

Loading…
Cancel
Save