Class: Tiler::Widgets::Iframe

Inherits:
Tiler::Widget show all
Defined in:
lib/tiler/widgets/iframe.rb

Constant Summary collapse

SANDBOX =

Fixed sandbox token list — host pages embed without script/forms or top-navigation hijacks, but can run their own styles + same-origin XHR. Catalog spec: not user-configurable.

"allow-scripts allow-same-origin allow-popups".freeze

Instance Attribute Summary

Attributes inherited from Tiler::Widget

#config, #panel

Instance Method Summary collapse

Methods inherited from Tiler::Widget

#empty?, example_config, example_payload, example_preview, #initialize, #label, #partial, #query_class, supports_color_config?, supports_palette_config?

Constructor Details

This class inherits a constructor from Tiler::Widget

Instance Method Details

#dataObject



18
19
20
21
22
# File 'lib/tiler/widgets/iframe.rb', line 18

def data
  { src: safe_url(config["src"]),
    title: config["title"].to_s,
    sandbox: SANDBOX }
end