Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meta(changelog): Update changelog for 8.0.0-alpha.8 #11472

Merged
merged 76 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
fcd63fa
feat(v8): Remove `data` from `SentrySpan` & rename types (#11303)
mydea Mar 27, 2024
dde1b3d
ref(eslint): Remove mocha (#11296)
AbhiPrasad Mar 27, 2024
e166422
test(browser): Test webpack 4 + Terser (#11250)
timfish Mar 27, 2024
ad02a79
feat(core): Handle string sample rates (#11305)
mydea Mar 27, 2024
df68e99
ref(angular): Don't include BrowserApiErrors in bundle (#11294)
AbhiPrasad Mar 27, 2024
c88ff46
ref: Move `node` & `node-experimental` folders (#11309)
mydea Mar 27, 2024
ebc9b53
Revert "ref: Move `node` & `node-experimental` folders" (#11318)
mydea Mar 27, 2024
5c29f22
Merge pull request #11313 from getsentry/master
mydea Mar 27, 2024
7e959c5
fix(web-vitals): Check for undefined navigation entry (#11311)
AbhiPrasad Mar 27, 2024
971b51d
Revert "Revert "ref: Move node & node-experimental folders" #11318" (…
mydea Mar 27, 2024
f6075f9
ref: Ignore node/node-experimental move PRs from git blame (#11323)
mydea Mar 27, 2024
53ea491
feat(replay): Bump `rrweb` to 2.12.0 (#11314)
billyvg Mar 27, 2024
2389646
ref(node): Remove the old `node` package (#11322)
mydea Mar 28, 2024
c1b4a47
test(node): Fix node session aggregate tests (#11334)
mydea Mar 28, 2024
fc23402
feat(feedback): Add `getFeedback` utility to get typed feedback insta…
mydea Mar 28, 2024
ae84d1a
test(node): Node HTTP instrumentation integration tests (#11335)
timfish Mar 28, 2024
0889751
test(node): All integration tests now use the new runner (#11341)
timfish Mar 28, 2024
5d98a4c
docs: Fix paths in readme to point to proper files (#11364)
mydea Apr 2, 2024
4ecb584
docs(contributing): Add link to Developer Documentation (#11367)
s1gr1d Apr 2, 2024
8ab596a
ref(v8): Remove `shouldCreateSpanForRequest` from vercel edge options…
mydea Apr 2, 2024
b0c9459
test(remix): Fix test for Node 14 (#11370)
mydea Apr 2, 2024
2e0c776
fix(node): Fix baggage propagation (#11363)
mydea Apr 2, 2024
9fa6c44
ref(v8): Remove `args` on `HandlerDataXhr` (#11373)
mydea Apr 2, 2024
ba9a0f4
ref(v8): Remove `getGlobalObject` utility method (#11372)
mydea Apr 2, 2024
cc0599f
ref(v8): Remove deprecated methods on scope (#11366)
mydea Apr 2, 2024
2e6f903
ref(v8): Remove deprecated `scope.getTransaction()` (#11365)
mydea Apr 2, 2024
84c9eb3
ref: Remove convertIntegrationFnToClass (#11343)
AbhiPrasad Apr 2, 2024
26da63a
feat(v8): Remove all class based integrations (#11345)
AbhiPrasad Apr 2, 2024
feab8af
ref(v8): Remove `addRequestDataToTransaction` util (#11369)
mydea Apr 2, 2024
ed4a751
feat(utils): Use `globalThis` (#11351)
timfish Apr 2, 2024
1044589
chore: Add bundle analysis package (#11379)
AbhiPrasad Apr 2, 2024
6a09675
feat(opentelemetry): Remove top level startActiveSpan (#11380)
AbhiPrasad Apr 3, 2024
e226550
feat(v8/core): Remove span.attributes top level field (#11378)
AbhiPrasad Apr 3, 2024
98c5275
ci(tests): Use `docker compose` instead of `docker-compose` (#11392)
lforst Apr 3, 2024
4085728
feat: Add loader file to node-based SDKs to support ESM monkeypatchin…
lforst Apr 3, 2024
eb8c57a
test(e2e): Attempt to fix sveltekit timeouts (#11394)
lforst Apr 3, 2024
8e349aa
test(e2e): Fix sveltekit-2 test timeouts (#11396)
Lms24 Apr 3, 2024
3ba23db
ref(v8): Remove deprecated `_reportAllChanges` option (#11393)
mydea Apr 3, 2024
b7a7ca3
ref(core): Remove duplicate logic in scope.update (#11384)
AbhiPrasad Apr 3, 2024
14c7c6b
ref(v8): Remove deprecated span & transaction properties (#11400)
mydea Apr 3, 2024
2981b85
ref(tracing): Remove `span.startChild()` (#11376)
mydea Apr 3, 2024
4bb4b62
ref(v8): Remove `pushScope`, `popScope`, `isOlderThan`, `shouldSendDe…
mydea Apr 3, 2024
6ed71ed
ref(gcp-serverless): Remove setting `.__sentry_transaction` (#11346)
AbhiPrasad Apr 3, 2024
e9fd0db
feat(tracing-internal): Reset propagation context on navigation (#11401)
Lms24 Apr 3, 2024
5f2295d
chore(format): Set biome as default VSCode formatter for typescript (…
Lms24 Apr 3, 2024
bcfde90
ref(v8): Remove `metadata` on transaction (#11397)
mydea Apr 3, 2024
e9d17d0
feat(deps): bump @sentry/cli from 2.30.2 to 2.31.0 (#11360)
dependabot[bot] Apr 3, 2024
63d8840
feat(core): Remove hub check in isSentryRequestUrl (#11407)
AbhiPrasad Apr 3, 2024
fd4a614
feat(types): Add View Hierarchy types (#11409)
timfish Apr 3, 2024
72e6926
feat(types): `beforeSend` and `beforeSendTransaction` breaking change…
timfish Apr 3, 2024
f2b1f3c
ref(feedback): Add font family to buttons (#11414)
c298lee Apr 3, 2024
3980730
feat: Add `trpcMiddleware` back to serverside SDKs (#11374)
lforst Apr 4, 2024
e6b4efa
build(deps-dev): bump vite from 4.0.5 to 4.5.3 in /packages/astro (#1…
dependabot[bot] Apr 4, 2024
9396528
feat: Implement timed events & remove `transaction.measurements` (#11…
mydea Apr 4, 2024
cbe9336
feat(browser): Bump web-vitals to 3.5.2 (#11391)
mydea Apr 4, 2024
a132d5c
feat(sveltekit): Update scope `transactionName` when pageload route n…
Lms24 Apr 4, 2024
b1a2f8b
feat(remix): Update scope `transactionName` when resolving route (#11…
Lms24 Apr 4, 2024
a6ab21d
chore(repo): Unstale `yarn.lock` (#11419)
Lms24 Apr 4, 2024
caf5306
test(e2e-nextjs): Check NextJS client error `transaction` field (#11424)
Lms24 Apr 4, 2024
3790f1b
feat(node): Add NestJS error handler (#11375)
onurtemizkan Apr 4, 2024
e307608
test: Port captureException and captureMessage tests from karma runne…
AbhiPrasad Apr 4, 2024
e5e5174
test(e2e): Extract event-proxy-server into dev package (#11427)
mydea Apr 4, 2024
532ce3f
ref(v8): Remove Transaction concept (#11422)
mydea Apr 4, 2024
a9ef859
feat(vue): Update scope's `transactionName` when resolving a route (#…
Lms24 Apr 4, 2024
38ab325
ref(feedback): Add font family style to actor (#11432)
c298lee Apr 4, 2024
30e7dcc
fix(core): unref timer to not block node exit (#11430)
AbhiPrasad Apr 4, 2024
dd4c9fe
ref(tests): Move `event-proxy-server` out of NestJS tests. (#11446)
onurtemizkan Apr 5, 2024
658898c
test: Port breadcrumb tests from karma runner (#11436)
AbhiPrasad Apr 5, 2024
3d82cdb
feat(node): Add Koa error handler (#11403)
onurtemizkan Apr 5, 2024
3f9cd43
feat: Add @sentry-internal/browser-utils (#11381)
AbhiPrasad Apr 5, 2024
3c07bcb
ref: Set preserveModules to true for browser packages (#11452)
AbhiPrasad Apr 5, 2024
6a76525
feat(replay): Use data sentry element as fallback for the component n…
c298lee Apr 5, 2024
a02e6ff
ref(nextjs): Replace multiplexer with conditional exports (#11442)
lforst Apr 8, 2024
b62ad08
feat(otel): Do not sample `options` and `head` requests (#11467)
s1gr1d Apr 8, 2024
6eddfc9
test(e2e/sveltekit): Unflake client error test by waiting for hydrati…
Lms24 Apr 8, 2024
5a03483
meta(changelog): Update changelog for 8.0.0-alpha.8
lforst Apr 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ targets:
- name: npm
id: '@sentry/core'
includeNames: /^sentry-core-\d.*\.tgz$/
## 1.4 Tracing package
## 1.4 Browser Utils package
- name: npm
id: '@sentry-internal/tracing'
includeNames: /^sentry-internal-tracing-\d.*\.tgz$/
id: '@sentry-internal/browser-utils'
includeNames: /^sentry-internal-browser-utils-\d.*\.tgz$/
## 1.5 Replay Internal package (browser only)
- name: npm
id: '@sentry-internal/replay'
Expand Down
8 changes: 7 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,19 @@ module.exports = {
},
},
{
files: ['scenarios/**', 'dev-packages/rollup-utils/**'],
files: ['scenarios/**', 'dev-packages/rollup-utils/**', 'dev-packages/bundle-analyzer-scenarios/**'],
parserOptions: {
sourceType: 'module',
},
rules: {
'no-console': 'off',
},
},
{
files: ['vite.config.ts'],
parserOptions: {
project: ['tsconfig.test.json'],
},
},
],
};
8 changes: 7 additions & 1 deletion .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,11 @@ ef6b3c7877d5fc8031c08bb28b0ffafaeb01f501
# chore: Enforce formatting of MD files in repository root #10127
aecf26f22dbf65ce2c0caadc4ce71b46266c9f45

# chore: Create dev-packages folder #9997
# chore: Create dev-packages folder #9997
35205b4cc5783237e69452c39ea001e461d9c84d

# ref: Move node & node-experimental folders #11309
# As well as revert and re-revert of this
971b51d4b8e92aa1b93c51074e28c7cbed63b486
ebc9b539548953bb9dd81d6a18adcdd91e804563
c88ff463a5566194a454b58bc555f183cf9ee813
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,12 @@ jobs:
- 'scripts/**'
- 'packages/core/**'
- 'packages/rollup-utils/**'
- 'packages/tracing/**'
- 'packages/tracing-internal/**'
- 'packages/utils/**'
- 'packages/types/**'
browser: &browser
- *shared
- 'packages/browser/**'
- 'packages/browser-utils/**'
- 'packages/replay/**'
- 'packages/replay-canvas/**'
- 'packages/feedback/**'
Expand All @@ -118,7 +117,6 @@ jobs:
node:
- *shared
- 'packages/node/**'
- 'packages/node-experimental/**'
- 'dev-packages/node-integration-tests/**'
nextjs:
- *shared
Expand All @@ -135,7 +133,6 @@ jobs:
profiling_node:
- *shared
- 'packages/node/**'
- 'packages/node-experimental/**'
- 'packages/profiling-node/**'
- 'dev-packages/e2e-tests/test-applications/node-profiling/**'
profiling_node_bindings:
Expand Down Expand Up @@ -1039,6 +1036,7 @@ jobs:
'create-remix-app-v2',
'create-remix-app-express-vite-dev',
'debug-id-sourcemaps',
# 'esm-loader-node-express-app', # This is currently broken for upstream reasons. See https://github.com/getsentry/sentry-javascript/pull/11338#issuecomment-2025450675
'nextjs-app-dir',
'nextjs-14',
'react-create-hash-router',
Expand All @@ -1050,8 +1048,11 @@ jobs:
'node-fastify-app',
# TODO(v8): Re-enable hapi tests
# 'node-hapi-app',
'node-nestjs-app',
'node-exports-test-app',
'node-koa-app',
'vue-3',
'webpack-4',
'webpack-5'
]
build-command:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flaky-test-detector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_dispatch:
pull_request:
paths:
- 'dev-packages/browser-integration-tests/suites/**'
- 'dev-packages/browser-integration-tests/suites/**/test.ts'
branches-ignore:
- master

Expand Down
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,8 @@
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit",
},
"editor.defaultFormatter": "biomejs.biome"
"editor.defaultFormatter": "biomejs.biome",
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
85 changes: 85 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,91 @@

- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott

## 8.0.0-alpha.8

This is the eighth alpha release of Sentry JavaScript SDK v8, which includes a variety of breaking changes.

Read the [in-depth migration guide](./MIGRATION.md) to find out how to address any breaking changes in your code.

### Important Changes

- **feat: Add @sentry-internal/browser-utils (#11381)**

A big part of the browser-runtime specific exports of the internal `@sentry/utils` package were moved into a new package
`@sentry-internal/browser-utils`. If you imported any API from `@sentry/utils` (which is generally not recommended but
necessary for some workarounds), please check that your import statements still point to existing exports after
upgrading.

- **feat: Add loader file to node-based SDKs to support ESM monkeypatching (#11338)**

When using ESM, it is necessary to use a "loader" to be able to instrument certain third-party packages and Node.js API.
The server-side SDKs now ship with a set of ESM loader hooks, that should be used when using ESM. Use them as follows:

```sh
# For Node.js <= 18.18.2
node --experimental-loader=@sentry/node/hook your-app.js

# For Node.js >= 18.19.0
node --import=@sentry/node/register your-app.js
```

Please note that due to an upstream bug, these loader hooks will currently crash or simply not work. We are planning to
fix this in upcoming versions of the SDK - definitely before a stable version 8 release.

- **feat(node): Add Koa error handler (#11403)**
- **feat(node): Add NestJS error handler (#11375)**

The Sentry SDK now exports integrations and error middlewares for Koa (`koaIntegration()`, `setupKoaErrorHandler()`) and
NestJS (`setupNestErrorHandler()`) that can be used to instrument your Koa and NestJS applications with error
monitoring.

### Removal/Refactoring of deprecated functionality

- feat(core): Remove hub check in isSentryRequestUrl (#11407)
- feat(opentelemetry): Remove top level startActiveSpan (#11380)
- feat(types): `beforeSend` and `beforeSendTransaction` breaking changes (#11354)
- feat(v8): Remove all class based integrations (#11345)
- feat(v8/core): Remove span.attributes top level field (#11378)
- ref: Remove convertIntegrationFnToClass (#11343)
- ref(node): Remove the old `node` package (#11322)
- ref(tracing): Remove `span.startChild()` (#11376)
- ref(v8): Remove `addRequestDataToTransaction` util (#11369)
- ref(v8): Remove `args` on `HandlerDataXhr` (#11373)
- ref(v8): Remove `getGlobalObject` utility method (#11372)
- ref(v8): Remove `metadata` on transaction (#11397)
- ref(v8): Remove `pushScope`, `popScope`, `isOlderThan`, `shouldSendDefaultPii` from hub (#11404)
- ref(v8): Remove `shouldCreateSpanForRequest` from vercel edge options (#11371)
- ref(v8): Remove deprecated `_reportAllChanges` option (#11393)
- ref(v8): Remove deprecated `scope.getTransaction()` (#11365)
- ref(v8): Remove deprecated methods on scope (#11366)
- ref(v8): Remove deprecated span & transaction properties (#11400)
- ref(v8): Remove Transaction concept (#11422)

### Other Changes

- feat: Add `trpcMiddleware` back to serverside SDKs (#11374)
- feat: Implement timed events & remove `transaction.measurements` (#11398)
- feat(browser): Bump web-vitals to 3.5.2 (#11391)
- feat(feedback): Add `getFeedback` utility to get typed feedback instance (#11331)
- feat(otel): Do not sample `options` and `head` requests (#11467)
- feat(remix): Update scope `transactionName` when resolving route (#11420)
- feat(replay): Bump `rrweb` to 2.12.0 (#11314)
- feat(replay): Use data sentry element as fallback for the component name (#11383)
- feat(sveltekit): Update scope `transactionName` when pageload route name is updated (#11406)
- feat(tracing-internal): Reset propagation context on navigation (#11401)
- feat(types): Add View Hierarchy types (#11409)
- feat(utils): Use `globalThis` (#11351)
- feat(vue): Update scope's `transactionName` when resolving a route (#11423)
- fix(core): unref timer to not block node exit (#11430)
- fix(node): Fix baggage propagation (#11363)
- fix(web-vitals): Check for undefined navigation entry (#11311)
- ref: Set preserveModules to true for browser packages (#11452)
- ref(core): Remove duplicate logic in scope.update (#11384)
- ref(feedback): Add font family style to actor (#11432)
- ref(feedback): Add font family to buttons (#11414)
- ref(gcp-serverless): Remove setting `.__sentry_transaction` (#11346)
- ref(nextjs): Replace multiplexer with conditional exports (#11442)

## 8.0.0-alpha.7

This is the seventh alpha release of Sentry JavaScript SDK v8, which includes a variety of breaking changes.
Expand Down
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

We welcome suggested improvements and bug fixes to the `@sentry/*` family of packages, in the form of pull requests on
[`GitHub`](https://github.com/getsentry/sentry-javascript). The guide below will help you get started, but if you have
further questions, please feel free to reach out on [Discord](https://discord.gg/Ww9hbqr).
further questions, please feel free to reach out on [Discord](https://discord.gg/Ww9hbqr). To learn about some general
SDK development principles check out the [SDK Development Guide](https://develop.sentry.dev/sdk/) in the Sentry
Developer Documentation.

## Setting up an Environment

Expand Down
23 changes: 21 additions & 2 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ For IE11 support please transpile your code to ES5 using babel or similar and ad

**Next.js**: The Next.js SDK now supports Next.js 13.2.0+

**Express**: Complex router setups are only properly parametrized in Node 16+.

## 2. Package removal

We've removed the following packages:
Expand Down Expand Up @@ -569,7 +571,7 @@ Sentry.getGlobalScope().addEventProcessor(event => {

The `lastEventId` function has been removed. See [below](./MIGRATION.md#deprecate-lasteventid) for more details.

#### Remove `void` from transport return types
#### Removal of `void` from transport return types

The `send` method on the `Transport` interface now always requires a `TransportMakeRequestResponse` to be returned in
the promise. This means that the `void` return type is no longer allowed.
Expand All @@ -588,7 +590,7 @@ interface Transport {
}
```

#### Remove `addGlobalEventProcessor` in favor of `addEventProcessor`
#### Removal of `addGlobalEventProcessor` in favor of `addEventProcessor`

In v8, we are removing the `addGlobalEventProcessor` function in favor of `addEventProcessor`.

Expand All @@ -608,6 +610,23 @@ addEventProcessor(event => {
});
```

#### Removal of `Sentry.Handlers.trpcMiddleware()` in favor of `Sentry.trpcMiddleware()`

The Sentry tRPC middleware got moved from `Sentry.Handlers.trpcMiddleware()` to `Sentry.trpcMiddleware()`. Functionally
they are the same:

```js
// v7
import * as Sentry from '@sentry/node';
Sentry.Handlers.trpcMiddleware();
```

```js
// v8
import * as Sentry from '@sentry/node';
Sentry.trpcMiddleware();
```

### Browser SDK (Browser, React, Vue, Angular, Ember, etc.)

Removed top-level exports: `Offline`, `makeXHRTransport`, `BrowserTracing`, `wrap`
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
console.log('One');
console.warn('Two', { a: 1 });
console.error('Error 2', { b: { c: [] } });

// Passed assertions _should not_ be captured
console.assert(1 + 1 === 2, 'math works');
// Failed assertions _should_ be captured
console.assert(1 + 1 === 3, 'math broke');

Sentry.captureException('test exception');
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { expect } from '@playwright/test';
import type { Event } from '@sentry/browser';

import { sentryTest } from '../../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers';

sentryTest('should capture console breadcrumbs', async ({ getLocalTestUrl, page }) => {
const url = await getLocalTestUrl({ testDir: __dirname });

const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);

expect(eventData.breadcrumbs).toEqual([
{
category: 'console',
data: { arguments: ['One'], logger: 'console' },
level: 'log',
message: 'One',
timestamp: expect.any(Number),
},
{
category: 'console',
data: { arguments: ['Two', { a: 1 }], logger: 'console' },
level: 'warning',
message: 'Two [object Object]',
timestamp: expect.any(Number),
},
{
category: 'console',
data: { arguments: ['Error 2', { b: '[Object]' }], logger: 'console' },
level: 'error',
message: 'Error 2 [object Object]',
timestamp: expect.any(Number),
},
{
category: 'console',
data: {
arguments: ['math broke'],
logger: 'console',
},
level: 'log',
message: 'Assertion failed: math broke',
timestamp: expect.any(Number),
},
]);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import * as Sentry from '@sentry/browser';

window.Sentry = Sentry;

Sentry.init({
dsn: 'https://[email protected]/1337',
defaultIntegrations: false,
integrations: [Sentry.breadcrumbsIntegration()],
sampleRate: 1,
});
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<body>
<button id="button1" type="button">Button 1</button>
<button id="button2" type="button">Button 2</button>
<button id="annotated-button" type="button" data-sentry-component="AnnotatedButton">Button 3</button>
<button id="annotated-button" type="button" data-sentry-component="AnnotatedButton" data-sentry-element="StyledButton">Button 3</button>
<button id="annotated-button-2" type="button" data-sentry-element="StyledButton">Button 4</button>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ sentryTest(

await page.goto(url);
await page.locator('#annotated-button').click();
await page.locator('#annotated-button-2').click();

const [eventData] = await Promise.all([promise, page.evaluate('Sentry.captureException("test exception")')]);

Expand All @@ -88,6 +89,12 @@ sentryTest(
message: 'body > AnnotatedButton',
data: { 'ui.component_name': 'AnnotatedButton' },
},
{
timestamp: expect.any(Number),
category: 'ui.click',
message: 'body > StyledButton',
data: { 'ui.component_name': 'StyledButton' },
},
]);
},
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const click = new MouseEvent('click');
function kaboom() {
throw new Error('lol');
}
Object.defineProperty(click, 'target', { get: kaboom });
const input = document.getElementById('input1');
input.dispatchEvent(click);
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<input id="input1" type="text" />
</body>
</html>
Loading
Loading