| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-10-29 | 1.2 kB | |
| v2.6.0 source code.tar.gz | 2026-10-29 | 160.2 kB | |
| v2.6.0 source code.zip | 2026-10-29 | 180.2 kB | |
| Totals: 3 Items | 341.6 kB | 0 | |
Minor Changes
- #440
73af9d5Thanks @matthewhudson! - Addcurrent-device/core, an entry point with no side effects on import, for scripts that run on pages they don't own. Importingcurrent-deviceadds generic class names such asmobileanddesktopto<html>, which can collide with the page's own CSS.current-device/coreexportscreateDevice({ classPrefix }): calling it adds the classes with the given prefix (cd-ios cd-iphone cd-mobile cd-portrait), starts the orientation listener and returns a device object with the whole API. The prefix applies to every class, the orientation classes included. The returned object is not assigned to thedeviceglobal, and the user agent is read whencreateDevice()is called rather than at import, which also makes detection easy to unit-test. Without a DOM it returns the same'unknown'device as the main entry point. The main entry point, the<script>build andcurrent-device/reactare unchanged.