diff --git a/packages/schema/src/bodyAttributes.ts b/packages/schema/src/bodyAttributes.ts
index 8b129c6..91b2cc9 100644
--- a/packages/schema/src/bodyAttributes.ts
+++ b/packages/schema/src/bodyAttributes.ts
@@ -1,19 +1,4 @@
-export interface BodyAttributes {
- /**
- * The class global attribute is a space-separated list of the case-sensitive classes of the element.
- *
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class
- */
- class?: string
- /**
- * The style global attribute contains CSS styling declarations to be applied to the element.
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/style
- */
- style?: string
- /**
- * This attribute defines the unique ID.
- */
- id?: string
+export interface BodyEvents {
/**
* Script to be run after the document is printed
*/
@@ -75,3 +60,23 @@ export interface BodyAttributes {
*/
onunload?: string
}
+
+export interface BaseBodyAttributes {
+ /**
+ * The class global attribute is a space-separated list of the case-sensitive classes of the element.
+ *
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class
+ */
+ class?: string
+ /**
+ * The style global attribute contains CSS styling declarations to be applied to the element.
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/style
+ */
+ style?: string
+ /**
+ * This attribute defines the unique ID.
+ */
+ id?: string
+}
+
+export type BodyAttributes = BaseBodyAttributes & BodyEvents
diff --git a/packages/schema/src/link.ts b/packages/schema/src/link.ts
index bccd366..a58dd4a 100644
--- a/packages/schema/src/link.ts
+++ b/packages/schema/src/link.ts
@@ -31,7 +31,7 @@ export type LinkRelTypes = 'alternate' |
'apple-touch-icon' |
'apple-touch-startup-image'
-export interface Link extends HttpEventAttributes {
+export interface LinkBase {
/**
* This attribute is only used when rel="preload" or rel="prefetch" has been set on the element.
* It specifies the type of content being loaded by the , which is necessary for request matching,
@@ -261,3 +261,5 @@ export interface Link extends HttpEventAttributes {
*/
id?: string
}
+
+export type Link = LinkBase & HttpEventAttributes
diff --git a/packages/schema/src/script.ts b/packages/schema/src/script.ts
index 4469d23..02774da 100644
--- a/packages/schema/src/script.ts
+++ b/packages/schema/src/script.ts
@@ -1,7 +1,7 @@
import type { Booleanable } from './utils'
import type { HttpEventAttributes } from './attributes'
-export interface Script extends HttpEventAttributes {
+export interface ScriptBase {
/**
* For classic scripts, if the async attribute is present,
* then the classic script will be fetched in parallel to parsing and evaluated as soon as it is available.
@@ -98,3 +98,5 @@ export interface Script extends HttpEventAttributes {
*/
id?: string
}
+
+export type Script = ScriptBase & HttpEventAttributes