New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-habitat

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-habitat - npm Package Compare versions

Comparing version 0.1.6-beta to 0.1.6-beta2

src/factories/ReactDomFactory.ts

4

lib/Bootstrapper.d.ts

@@ -10,3 +10,3 @@ /**

import { IContainer } from './interfaces/IContainer';
import { IDOMFactory } from './interfaces/IDOMFactory';
import { IDomFactory } from './interfaces/IDomFactory';
/**

@@ -29,3 +29,3 @@ * Bootstrapper class

*/
factory: IDOMFactory;
factory: IDomFactory;
/**

@@ -32,0 +32,0 @@ * The raw dom elements

@@ -10,3 +10,3 @@ /**

var Habitat_1 = require('./Habitat');
var ReactDOMFactory_1 = require('./factories/ReactDOMFactory');
var ReactDomFactory_1 = require('./factories/ReactDomFactory');
/**

@@ -28,3 +28,3 @@ * Bootstrapper class

*/
this.factory = new ReactDOMFactory_1.ReactDOMFactory();
this.factory = new ReactDomFactory_1.ReactDomFactory();
// Sanity check

@@ -35,3 +35,3 @@ if (!window || (!window && !window.document)) {

// Find all the elements in the dom with the component selector attribute
this.firstClassElements = window.document.querySelectorAll("[" + this.componentSelector + "]");
this.firstClassElements = window.document.body.querySelectorAll("[" + this.componentSelector + "]");
}

@@ -38,0 +38,0 @@ /**

@@ -1,5 +0,5 @@

import { IDOMFactory } from '../interfaces/IDOMFactory';
export declare class ReactDOMFactory implements IDOMFactory {
import { IDomFactory } from '../interfaces/IDomFactory';
export declare class ReactDomFactory implements IDomFactory {
identifier(): string;
inject(module: any, props: {}, target: Element): void;
}

@@ -11,9 +11,9 @@ /**

var ReactDOM = require('react-dom');
var ReactDOMFactory = (function () {
function ReactDOMFactory() {
var ReactDomFactory = (function () {
function ReactDomFactory() {
}
ReactDOMFactory.prototype.identifier = function () {
return 'React';
ReactDomFactory.prototype.identifier = function () {
return 'react';
};
ReactDOMFactory.prototype.inject = function (module, props, target) {
ReactDomFactory.prototype.inject = function (module, props, target) {
if (target) {

@@ -26,4 +26,4 @@ ReactDOM.render(React.createElement(module, props || {}), target);

};
return ReactDOMFactory;
return ReactDomFactory;
}());
exports.ReactDOMFactory = ReactDOMFactory;
exports.ReactDomFactory = ReactDomFactory;

@@ -9,3 +9,3 @@ /**

import { IContainer } from './IContainer';
import { IDOMFactory } from "./IDOMFactory";
import { IDomFactory } from "./IDomFactory";
/**

@@ -15,3 +15,3 @@ * The Bootstrapper interface

export interface IBootstrapper {
factory: IDOMFactory;
factory: IDomFactory;
setContainer: (container: IContainer) => void;

@@ -18,0 +18,0 @@ /**

@@ -11,3 +11,3 @@ /**

*/
export interface IDOMFactory {
export interface IDomFactory {
/**

@@ -14,0 +14,0 @@ * An identifier string for the type of components this injects

{
"name": "react-habitat",
"version": "0.1.6-beta",
"version": "0.1.6-beta2",
"description": "A React DOM Bootstrapper designed to harmonise a hybrid application",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -11,6 +11,6 @@ /**

import {IContainer} from './interfaces/IContainer';
import {IDOMFactory} from './interfaces/IDOMFactory';
import {IDomFactory} from './interfaces/IDomFactory';
import {Habitat} from './Habitat';
import {ReactDOMFactory} from './factories/ReactDOMFactory';
import {ReactDomFactory} from './factories/ReactDomFactory';

@@ -39,3 +39,3 @@ /**

*/
factory: IDOMFactory = new ReactDOMFactory();
factory: IDomFactory = new ReactDomFactory();

@@ -59,3 +59,3 @@ /**

// Find all the elements in the dom with the component selector attribute
this.firstClassElements = window.document.querySelectorAll(`[${this.componentSelector}]`);
this.firstClassElements = window.document.body.querySelectorAll(`[${this.componentSelector}]`);
}

@@ -62,0 +62,0 @@

@@ -10,3 +10,3 @@ /**

import {IContainer} from './IContainer';
import {IDOMFactory} from "./IDOMFactory";
import {IDomFactory} from "./IDomFactory";

@@ -18,3 +18,3 @@ /**

factory: IDOMFactory;
factory: IDomFactory;

@@ -21,0 +21,0 @@ setContainer:(container:IContainer) => void;

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