1 // Copyright 2013 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
13 Register("iframe", parseIframe)
17 Cmd string // original command from present source
23 func (i Iframe) PresentCmd() string { return i.Cmd }
24 func (i Iframe) TemplateName() string { return "iframe" }
26 func parseIframe(ctx *Context, fileName string, lineno int, text string) (Elem, error) {
27 args := strings.Fields(text)
29 return nil, fmt.Errorf("incorrect iframe invocation: %q", text)
31 i := Iframe{Cmd: text, URL: args[1]}
32 a, err := parseArgs(fileName, lineno, args[2:])
40 if v, ok := a[0].(int); ok {
43 if v, ok := a[1].(int); ok {
47 return nil, fmt.Errorf("incorrect iframe invocation: %q", text)