@unhead/vue 1.8.0-beta.7 → 1.8.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -103,7 +103,7 @@ function useScript(_input, _options) {
103
103
  const status = vue.ref("awaitingLoad");
104
104
  shared.NetworkEvents.forEach((fn) => {
105
105
  const _fn = typeof input[fn] === "function" ? input[fn].bind(ctx) : null;
106
- if (_fn) {
106
+ if (_fn || fn === "onload" || fn === "onerror") {
107
107
  input[fn] = (e) => {
108
108
  status.value = fn === "onload" ? "loaded" : fn === "onerror" ? "error" : "loading";
109
109
  _fn && _fn(e);
package/dist/index.mjs CHANGED
@@ -103,7 +103,7 @@ function useScript(_input, _options) {
103
103
  const status = ref("awaitingLoad");
104
104
  NetworkEvents.forEach((fn) => {
105
105
  const _fn = typeof input[fn] === "function" ? input[fn].bind(ctx) : null;
106
- if (_fn) {
106
+ if (_fn || fn === "onload" || fn === "onerror") {
107
107
  input[fn] = (e) => {
108
108
  status.value = fn === "onload" ? "loaded" : fn === "onerror" ? "error" : "loading";
109
109
  _fn && _fn(e);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unhead/vue",
3
3
  "type": "module",
4
- "version": "1.8.0-beta.7",
4
+ "version": "1.8.0-beta.8",
5
5
  "author": "Harlan Wilton <harlan@harlanzw.com>",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/harlan-zw",
@@ -48,9 +48,9 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "hookable": "^5.5.3",
51
- "@unhead/schema": "1.8.0-beta.7",
52
- "@unhead/shared": "1.8.0-beta.7",
53
- "unhead": "1.8.0-beta.7"
51
+ "@unhead/schema": "1.8.0-beta.8",
52
+ "@unhead/shared": "1.8.0-beta.8",
53
+ "unhead": "1.8.0-beta.8"
54
54
  },
55
55
  "devDependencies": {
56
56
  "vue": "^3.3.4"