Socket
Socket
Sign inDemoInstall

ember-cli-visible

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-visible

An addon to help with visibility states of your app, like if your tab and window are visible or not.


Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Visible

This is an ember-cli addon that helps you deal with whether or not your application is currently visible to the user or not. For instance, whether the user is on another tab or has blurred the browser entirely.

Just install in your app, and then controllers and routes can access the two main ways of interacting with this plugin: this.visible.now (boolean) and this.visible.state (string repsonse). E.g.

  import Ember from 'ember';

  export default Ember.Controller.extend({
    showNotifications: function() {
      return this.visible.now && this.get("settings.notify");
    }.property("visible.now"),
  });

You can also use this.visible.state to get the current state of visibility. Either visible, hidden, blur, or init (rarely).

Installation

  • Run ember install:addon ember-cli-visible

Running

  • ember server
  • Visit your app at http://localhost:4200.

Running Tests

  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.

Keywords

FAQs

Package last updated on 31 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc