Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

<img-view>

img-view provides almost the same role as an img element in your Chrome Apps. By specifying the src attribute, you can display the external image resources.

The first steps to use img-view element:

  • Load img-view.js in the head tag
  • Add the "webview" in the permissions of manifest.json
  • Add the following setting description in manifest.json
"webview": {
    "partitions": [
        {
            "name": "static",
            "accessible_resources": ["i.html"]
        }
    ]
}

Install

$ bower install daiz713/img-view

Examples:

Display the square (100 x 100 px) avatar image:

<style>
    #avatar {
        width:  100px;
        height: 100px;
    }
</style>

<img-view id="avatar" src="https://avatars0.githubusercontent.com/u/4409909"></img-view>

Display the circle avatar image:

<img-view id="avatar" bgcolor="#eee" radius="50%" src="https://avatars0.githubusercontent.com/u/4409909"></img-view>

About

HTML <img> tag for Chrome Apps

Resources

License

Releases

No releases published

Packages

No packages published