Created
May 18, 2016 13:03
-
-
Save pimterry/9e8e74a60a75de8969376f170aedf214 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var components = require("server-components"); | |
var GoogleMap = components.newElement(); | |
// Note: ES6 without build steps. On the server-side, we pick the JS engine. | |
GoogleMap.createdCallback = (document) => { | |
this.innerHTML = ` | |
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m12!1m3!1d11969.1769064053!2d2.15484835!3d41.411131299999994!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!5e0!3m2!1sen!2ses!4v1463576398125" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe> | |
` | |
}; | |
components.registerElement("google-map", { prototype: GoogleMap }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment