【问题标题】:last-child CSS selector not working in GAS with HtmlService?最后一个子 CSS 选择器不能在 GAS 中使用 HtmlService?
【发布时间】:2013-05-15 12:44:05
【问题描述】:

我有一个脚本 doGet,我使用 HtmlService.createTemplateFromFile 服务来呈现一个 html 文件。

在 HTML 模板的标题部分有一个样式条目:

<style>
  .subtopicp { margin: 5px 7px 5px 7px; border-bottom: 1px solid black;}
  .subtopicp:last-child { border-bottom: none;}
</style>

当我将评估后的 HTML 代码粘贴到文件中时,此方法有效,但在 GAS Web 应用程序中,.subtopicp:last-child 行永远无法识别。

:last-child 这样的 CSS 选择器在 GAS HtmlService 中根本不可用,或者在 Caja 净化的网络应用程序中是否有解决此类问题的方法?

【问题讨论】:

    标签: google-apps-script google-caja


    【解决方案1】:

    :last-child 不在 Caja 的白名单中。可以request添加。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-07
      • 2016-04-17
      • 1970-01-01
      • 2022-06-23
      • 2011-12-08
      • 1970-01-01
      • 2014-04-26
      • 1970-01-01
      相关资源
      最近更新 更多