Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
ember-tether
Advanced tools
This ember-cli addon provides a component that allows for 'tethering' a block to a target somewhere else on the page. The target may be an element, an element selector, or an Ember view. Importantly, the component retains typical context for Ember action handling and data binding.
For Ember 1.13 - 2.3, use 0.4.1. For support for earlier versions of Ember, use ember-tether 0.3.1.
View a live demo here: http://yapplabs.github.io/ember-tether/
ember install ember-tether
Note: Ember CLI versions < 0.2.3 should use ember install:addon
instead of ember install
Given the following DOM:
<body class="ember-application">
<div id="a-nice-person">
Nice person
</div>
<div class="ember-view">
<!-- rest of your Ember app's DOM... -->
</div>
</body>
and a template like this:
<EmberTether
@target='#a-nice-person'
@targetAttachment='top right'
@attachment='top left'
>
A puppy
</EmberTether>
Then "A puppy" would be rendered alongside the a-nice-person
div.
If the ember-tether component is destroyed, its far-off content is destroyed too. For example, given:
{{#if this.isShowing}}
<EmberTether
@target='#a-nice-person'
@targetAttachment='top right'
@attachment='top left'
>
A puppy
</EmberTether>
{{/if}}
If this.isShowing
starts off true and becomes false, then the "A puppy" text will be removed from the page.
Similarly, if you use <EmberTether />
in a route's template, it will
render its content next to the target element when the route is entered
and remove it when the route is exited.
Tether works by appending tethered elements to the <body>
tag. Unfortunately, this moves your content outside of the Ember application rootElement
during acceptance testing. This breaks event dispatch and action handling, including traditional Ember test helpers like click
.
As of version 0.4.0, we can configure a different element to be used instead of body. This can be useful for Ember tests.
// config/environment.js
ENV['ember-tether'] = {
bodyElementId: 'ember-testing'
};
It is also possible to pass a bodyElement
to a particular ember-tether component declaration.
See the Contributing guide for details.
FAQs
Tether an element to another element in the DOM
The npm package ember-tether receives a total of 11,883 weekly downloads. As such, ember-tether popularity was classified as popular.
We found that ember-tether demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.