Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-hellgate

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-hellgate

This addon helps you migrate an old application to Ember. It lets you define routes that load plain html pages inside an Ember app.

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

ember-hellgate Build Status

This addon helps you migrate an old application to Ember. It lets you define routes that load plain html pages inside an Ember app.

Pages loaded in a hellgate are loaded inside an iframe, so, they're totally isolated from the Ember app.

The objective of this addon is to let you create an Ember app that links to pages of the old system and, as you migrate each page to Ember, you replace the "hellgate" with normal routes.

Install

ember install ember-hellgate

Defining hellgates

In the router you call this.hellgate(route, url) to define the name of the route and the url that should be loaded.

// app/router.js
Router.map(function() {
  this.hellgate('some-page', '/somepage.html');
  this.hellgate('my-search', 'http://apple.com');
});

Escaping hell

The page loaded inside a "hellgate" can call actions of the route. For that, you should use the function escapeHell.

// app/router.js
Router.map(function() {
  this.hellgate('test', '/test.html');
});
<!-- test.html (Page loaded inside a hellgate) -->
<html>
  <body>
    <span>Escape hell</span>
    <script type="text/javascript">
      window.parent.escapeHell('showMessage', 'Hello');
    </script>
  </body>
</html>
// app/routes/test.js
export default Ember.Route.extend({
  actions: {
    showMessage(message) {
      alert(`Message from hell: ${message}`);
    }
  }
});

Styling the hellgate

The hellgate generates the following HTML:

<div class="hellgate-container">
  <iframe class="hellgate-iframe" src="..."></iframe>
</div>

So you can define styles for the container and for the iframe:

.hellgate-container {
  width: 100px;
  height: 400px;
  border: 1px solid red;
}

Keywords

FAQs

Package last updated on 23 Mar 2016

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