LearnNewsExamplesServices
Frontmatter
id5677
titlecomponent.Video: remove beforeSetPlaying()
stateClosed
labels
enhancement
assigneesDinkh
createdAtAug 3, 2024, 8:45 PM
updatedAtAug 10, 2024, 6:17 PM
githubUrlhttps://github.com/neomjs/neo/issues/5677
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtAug 10, 2024, 6:17 PM

component.Video: remove beforeSetPlaying()

Closed v8.1.0 enhancement
tobiu
tobiu commented on Aug 3, 2024, 8:45 PM
    beforeSetPlaying(value, oldValue) {
        if (!Neo.isBoolean(value)) {
            return oldValue
        }

        return value
    }

Validating a boolean on class level is pointless. Doing a check for specific enum values is fine, but when it comes to base types, this is way over the top. Imagine we would add beforeSetX() for every possible boolean, number or string config inside the framework.

We can think about generic config type checkings, but this is not the way to go.

tobiu added the enhancement label on Aug 3, 2024, 8:45 PM
tobiu assigned to @Dinkh on Aug 3, 2024, 8:45 PM
Dinkh
Dinkh Aug 10, 2024, 6:17 PM

removed

Dinkh closed this issue on Aug 10, 2024, 6:17 PM