---
number: 3966
title: Overridden methods allow this.callOverridden()
author: Dinkh
state: MERGED
createdAt: '2023-02-01T12:17:20Z'
updatedAt: '2023-02-02T10:32:41Z'
closedAt: '2023-02-02T10:32:34Z'
mergedAt: '2023-02-02T10:32:34Z'
head: Overrides-patch-2
base: dev
url: 'https://github.com/neomjs/neo/pull/3966'
---
solving #3965

You can use now `this.callOverridden(methodName, ...arguments);`

@example

```
         Neo.overrides = {
             Neo: {
                 component: {
                     Base: {
                         afterSetHeight(value, oldValue) {
                             this.callOverridden('afterSetHeight', ...arguments);
                         }
                     }
                 }
             }
         };

        export default Neo.overrides;
```

Please make sure to read the Contributing Guidelines:

https://github.com/neomjs/neo/blob/dev/CONTRIBUTING.md

<!-- PULL REQUEST TEMPLATE -->
<!-- (Update "[ ]" to "[x]" to check a box) -->

**What kind of change does this PR introduce?** (check at least one)

- [ ] Bugfix
- [x] Feature
- [ ] Code style update
- [ ] Refactor
- [ ] Build-related changes
- [ ] Other, please describe:

**Does this PR introduce a breaking change?** (check one)

- [ ] Yes
- [x] No

If yes, please describe the impact and migration path for existing applications:

**The PR fulfills these requirements:**

- [x] It's submitted to the `dev` branch, _not_ the `master` branch
- [x] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number)

If adding a **new feature**, the PR's description includes:
- [ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

**Other information:**


## Comments

### `@tobiu` commented on 2023-02-01T20:09:38Z

review in short: looks good for most areas. fine tuning:
`callOverridden()` => i would cache the regex, e.g. inside a static class field.

`@type {{}}` will most likely kill the JSDoc parser. not following the way we comment members.

`static applyOverrides` => using `if` 2 times followed by a blank char and 2x without (with blank is now inside the new coding guidelines). i would also put cls and items comma separated after overrides.

feel free to apply the changes on your own or ping me if i should do it after the merge. guess writing this comment took more time than applying the fine tuning :P

---

