Sha256: b0348a8ef9e3bf8b876786054e8a9f4b707e3e8892496328e1a9bc124958cd3e

Contents?: true

Size: 499 Bytes

Versions: 4

Compression:

Stored size: 499 Bytes

Contents

#= require ../page

# @mixin
Joosy.Modules.Page.Title =

  #
  # Sets the page HTML title.
  #
  # @note Title will be reverted on unload.
  #
  # @param [String] title       Title to set.
  #
  title: (title, separator=' / ') ->
    @afterLoad ->
      title = title.apply(@) if typeof(title) == 'function'
      title = title.join(separator) if title instanceof Array
      @__previousTitle = document.title
      document.title = title

    @afterUnload ->
      document.title = @__previousTitle

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
joosy-1.2.0.beta.4 source/joosy/modules/page/title.coffee
joosy-1.2.0.beta.3 source/joosy/modules/page/title.coffee
joosy-1.2.0.beta.2 source/joosy/modules/page/title.coffee
joosy-1.2.0.beta.1 source/joosy/modules/page/title.coffee