Socket
Socket
Sign inDemoInstall

@aplazame/browser

Package Overview
Dependencies
Maintainers
0
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aplazame/browser - npm Package Compare versions

Comparing version 0.1.13 to 0.1.14

15

dist/AplazameIFrame.d.ts

@@ -15,3 +15,4 @@ import { EventEmitter, DetailsEvent } from './EventEmitter.js';

currentStyles: {
[key: string]: string;
[key: string]: unknown;
important?: Record<string, string>;
};

@@ -41,8 +42,16 @@ currentAttributes: {

}): this;
setStyles(styles: string | {
[key: string]: string;
setStyles(styles?: {
[key: string]: unknown;
important?: Record<string, string>;
}): this;
applyStyles(styles?: {
[key: string]: unknown;
important?: Record<string, string> | undefined;
}): this;
setAttributes(attributes: {
[key: string]: string;
}): this;
applyAttributes(attributes?: {
[key: string]: string;
}): this;
resetStyles(): this;

@@ -49,0 +58,0 @@ resetAttributes(): void;

27

dist/AplazameIFrame.js

@@ -94,5 +94,4 @@ "use strict";

this.iframe.src = this.url.toString();
Object.assign(this.iframe.style, this.currentStyles);
for (const key in this.currentAttributes)
this.iframe.setAttribute(key, this.currentAttributes[key]);
this.applyStyles();
this.applyAttributes();
el.appendChild(this.iframe);

@@ -109,3 +108,3 @@ // listening messages

}
setStyles(styles) {
setStyles(styles = {}) {
var _a;

@@ -116,9 +115,19 @@ const newSytles = typeof styles === 'string'

this.currentStyles = Object.assign(Object.assign({}, this.currentStyles), newSytles);
this.applyStyles();
return this;
}
applyStyles(styles = this.currentStyles) {
const iframe = this.iframe;
if (iframe) {
Object.keys(newSytles).forEach(key => {
if (newSytles[key] === null)
Object.keys(styles).forEach(key => {
if (key === 'important') {
for (const key in styles.important) {
iframe.style.setProperty(key, String(styles[key]), 'important');
}
return;
}
if (styles[key] === null)
iframe.style.removeProperty(key);
else
iframe.style.setProperty(key, newSytles[key]);
iframe.style.setProperty(key, String(styles[key]));
});

@@ -130,2 +139,6 @@ }

this.currentAttributes = Object.assign(Object.assign({}, this.currentAttributes), attributes);
this.applyAttributes();
return this;
}
applyAttributes(attributes = this.currentAttributes) {
const iframe = this.iframe;

@@ -132,0 +145,0 @@ if (iframe) {

{
"name": "@aplazame/browser",
"version": "0.1.13",
"version": "0.1.14",
"description": "Aplazame SDK for browser",

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

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