Skip to content

Pushwoosh Web SDK v3.117.0

Choose a tag to compare

@PushwooshCI PushwooshCI released this 30 Nov 19:52
· 1 commit to master since this release

refactor(platform-checker): split browser detection into pure functions

  • PlatformChecker is split into detectBrowser, getFormFactor, getPushCapabilities and resolvePlatform; the
    class stays as a facade for sites that read Pushwoosh.platformChecker, its remaining getters marked deprecated.
  • The Safari driver choice no longer reads the user agent: the legacy path follows window.safari.pushNotification.
    The platform code comes from that path and unifiedPlatform; the user agent only tells Firefox (12) from the rest.
  • Device type and device model sent with registerDevice are unchanged. Legacy EdgeHTML, which no longer exists in
    the wild, is reported as 11 instead of the unrouted 150.
  • The subscription button shows the Safari help images to every Safari, iOS included; iOS Safari used to get Chrome's.
  • platformChecker behaviour changes for sites that read it: isSafari now means window.safari.pushNotification
    exists, where it used to need only window.safari and "Safari" in the user agent; isEdge is now true for Chromium
    Edge.
  • Breaking for sites that call them: the isSafariBrowser, isOperaBrowser, isEdgeBrowser, isFirefoxBrowser,
    isChromeBrowser, isMacOS, canUseServiceWorkers and canReceiveNotifications methods are removed. Use
    browser.name, capabilities and isAvailableNotifications instead; isMacOS has no replacement.

Changes since v3.116.0.