🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

view-binary-element

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

view-binary-element - npm Package Compare versions

Comparing version
0.0.2
to
0.0.3
+1
-1
bower.json
{
"name": "view-binary-element",
"version": "0.0.2",
"version": "0.0.3",
"description": "Native Web Component for previewing a few common types of binary files",

@@ -5,0 +5,0 @@ "main": [

# Change Log
## [0.0.3](https://github.com/grtjn/view-binary-element/tree/0.0.3) (2020-02-10)
[Full Changelog](https://github.com/grtjn/view-binary-element/compare/0.0.2...0.0.3)
**Implemented enhancements:**
- Consider adding max-width 100% on img by default [\#14](https://github.com/grtjn/view-binary-element/issues/14)
- Toggle to disable shadowroot [\#13](https://github.com/grtjn/view-binary-element/issues/13)
## [0.0.2](https://github.com/grtjn/view-binary-element/tree/0.0.2) (2018-06-07)

@@ -8,5 +16,5 @@ [Full Changelog](https://github.com/grtjn/view-binary-element/compare/0.0.1...0.0.2)

- Add HTML Imports polyfill for demo site [\#6](https://github.com/grtjn/view-binary-element/issues/6)
- Document how to use in AngularJS [\#12](https://github.com/grtjn/view-binary-element/issues/12)
- Gracefull decay for lack of Shadow DOM support [\#7](https://github.com/grtjn/view-binary-element/issues/7)
- Add HTML Imports polyfill for demo site [\#6](https://github.com/grtjn/view-binary-element/issues/6)

@@ -13,0 +21,0 @@ **Fixed bugs:**

{
"name": "view-binary-element",
"version": "0.0.2",
"version": "0.0.3",
"description": "Native Web Component for previewing a few common types of binary files",

@@ -5,0 +5,0 @@ "dependencies": {},

@@ -14,2 +14,5 @@ <template id="view-binary-template">

}
.view-binary #view-binary-picture img {
max-width: 100%;
}

@@ -80,3 +83,3 @@ /* fontawesome (copied because of Shadow DOM isolation) */

// Usage:
// <view-binary src="" type="" title="">
// <view-binary src="" type="" title="" shadow="true">
// <a class="btn btn-default" href="" target="_blank" download>Download</a>

@@ -95,3 +98,3 @@ // </view-binary>

static get observedAttributes() {
return ["src", "type", "title"];
return ["src", "type", "title", "shadow"];
}

@@ -115,2 +118,3 @@

this._title = undefined;
this._shadow = true;

@@ -176,2 +180,6 @@ // initialize template placeholders

}
case "shadow": {
this._shadow = '' + newValue === 'true';
break;
}
}

@@ -217,5 +225,16 @@

set shadow(value) {
if (value)
this.setAttribute('shadow', value);
else
this.removeAttribute('shadow');
}
get shadow() {
return this._shadow;
}
// initialize contents of custom element
_initialize() {
if (this.attachShadow) {
if (this._shadow && this.attachShadow) {
// enable Shadow DOM

@@ -250,2 +269,3 @@ this.attachShadow({mode: 'open'});

this._upgradeProperty("title");
this._upgradeProperty("shadow");

@@ -252,0 +272,0 @@ // initialize rendering