Skip to content

Unknown value of 0 means "assume slow" but example shows "assume fast" #5

Description

@mmocny

I can image websites progressively enhancing with effects using code such as:

const minCpuLevel = 2;
if (navigator.cpuPerformance > minCpuLevel) {
  // add sparkles
}

But for any devices with unknown value of 0, this would not be enabled, unless explicitly tested for.

Should the Unknown special value be some large constant or Number.MAX_SAFE_INTEGER?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions