Google Web Designer自定义HTML5组件

时间:2014-06-25 06:31:37

标签: javascript html5 web-component google-web-designer

如何制作自定义Google Web Designer组件?

我原以为他们会像Adobe Flash Components一样。它处于测试阶段,我无法找到很多相关信息。

我已尝试搜索/Applications/Google Web Designer.app/Contents下的所有目录,看看我是否可以侦察一些样本。文档面向用户:https://support.google.com/webdesigner/

我想构建团队可以使用的HTML5广告组件。

1 个答案:

答案 0 :(得分:3)

  1. 您应该根据W3C标准
  2. 创建自己的自定义标签
  3. 为您的组件创建json清单:

    { name: {string} A human readable name description: {string} A succinct but complete description of the component type: {string} The element type, which must contain a dash (-) version: {number} The version number, which must be incremented with each update files: {Array.<FilesObject>} The JS and CSS files for the component externalScripts: {Array.<string>} The external script dependencies dependencies: {Array.<string>} The dependent types attributes: {Array.<Attribute>} The attributes of the component methods: {Array.<Method>} The methods of the component events: {Array.<Event>} The events dispatched by the component metrics: {Array.<MetricEvent>} Events that must be tracked as a metric }

  4. 创建所有必需的.js和.css,然后打包组件。

  5. 在以下链接中,您可以找到有关如何为GWD创建自定义组件的教程。

    https://support.google.com/webdesigner/topic/6175711?hl=en&ref_topic=6175722&vid=1-635799099790786490-3463806884

    希望它有所帮助。