polymer

package module
v0.0.0-...-4653021 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2015 License: MIT Imports: 4 Imported by: 0

README

go-polymer

A GopherJS Binding for Polymer

Documentation

Overview

The MIT License (MIT)

The MIT License (MIT)

The MIT License (MIT)

The MIT License (MIT)

The MIT License (MIT)

Copyright (c) 2015 Eric Anderton

Index

Constants

This section is empty.

Variables

View Source
var (
	// Registry for all types to be ignored when processing Polymer tags.
	// Any type in this array will not participate in Polymer field handling,
	// will be regarded as though `polymer:"-"` was used on the field.
	IgnoredTagTypes = []reflect.Type{
		reflect.TypeOf(BasicComponent{}),
		reflect.TypeOf(PolymerBase{}),
		reflect.TypeOf(UpdateableAdapter{}),
		reflect.TypeOf(make(UpdateChan)),
	}
)

Functions

func Polymer

func Polymer(tagName string, defaultObj interface{})

Types

type AsyncHandle

type AsyncHandle struct {
	*js.Object
}

type AttributeListener

type AttributeListener interface {
	AttributeChanged(attrName string, oldVal, newVal interface{})
}

type BasicComponent

type BasicComponent struct {
	PolymerBase
	UpdateableAdapter
}

type Component

type Component interface {
	InitComponent(this *js.Object)
}

type DomNode

type DomNode struct {
	*js.Object
}

TODO: use a DOM library to wrap *js.Object here?

type EventOptions

type EventOptions struct {
	Node       *js.Object
	NoBubble   bool
	Cancelable bool
}

type ImportChan

type ImportChan chan ImportResult

type ImportResult

type ImportResult struct {
	Doc DomNode
	Err error
}

type LifecycleAdapter

type LifecycleAdapter struct{}

func (*LifecycleAdapter) Attached

func (c *LifecycleAdapter) Attached()

func (*LifecycleAdapter) Created

func (c *LifecycleAdapter) Created()

func (*LifecycleAdapter) Detached

func (c *LifecycleAdapter) Detached()

func (*LifecycleAdapter) DomReady

func (c *LifecycleAdapter) DomReady()

func (*LifecycleAdapter) Ready

func (c *LifecycleAdapter) Ready()

type LifecycleListener

type LifecycleListener interface {
	Created()
	Ready()
	Attached()
	DomReady()
	Detached()
}

type PolymerBase

type PolymerBase struct {
	// contains filtered or unexported fields
}

func (*PolymerBase) Async

func (p *PolymerBase) Async(fn interface{}, waitMilliseconds uint) AsyncHandle

func (*PolymerBase) AttributeFollows

func (p *PolymerBase) AttributeFollows(name string, newNode, oldNode DomNode)

func (*PolymerBase) CancelAsync

func (p *PolymerBase) CancelAsync(handle AsyncHandle)

func (*PolymerBase) CancelDebouncer

func (p *PolymerBase) CancelDebouncer(jobName string)

func (*PolymerBase) Debounce

func (p *PolymerBase) Debounce(jobName string, fn interface{}, waitMilliseconds uint)

func (*PolymerBase) Fire

func (p *PolymerBase) Fire(evtType string, detail interface{}, opts EventOptions)

func (*PolymerBase) FireBasic

func (p *PolymerBase) FireBasic(evtType string)

func (*PolymerBase) FlushDebouncer

func (p *PolymerBase) FlushDebouncer(jobName string)

func (*PolymerBase) ImportHref

func (p *PolymerBase) ImportHref(url string) ImportChan

func (*PolymerBase) InitComponent

func (p *PolymerBase) InitComponent(this *js.Object)

func (*PolymerBase) IsDebouncerActive

func (p *PolymerBase) IsDebouncerActive(jobName string) bool

func (*PolymerBase) OnMutation

func (p *PolymerBase) OnMutation(node *DomNode, fn func())

func (*PolymerBase) Q

func (p *PolymerBase) Q(name ...string) *QNode

func (*PolymerBase) Query

func (p *PolymerBase) Query(selector string) DomNode

func (*PolymerBase) ToggleClass

func (p *PolymerBase) ToggleClass(name string, state bool, node DomNode)

func (*PolymerBase) Transform

func (p *PolymerBase) Transform(expr string, node DomNode)

func (*PolymerBase) Translate3d

func (p *PolymerBase) Translate3d(x, y, z string, node DomNode)

type PropertyListener

type PropertyListener interface {
	PropertyChanged(fieldName string, oldVal, newVal interface{})
}

type QNode

type QNode struct {
	*js.Object
}

func (*QNode) Q

func (q *QNode) Q(name ...string) *QNode

type UpdateChan

type UpdateChan chan struct{}

type Updateable

type Updateable interface {
	RegisterComponent(update UpdateChan)
	UpdateComponent()
}

type UpdateableAdapter

type UpdateableAdapter struct {
	// contains filtered or unexported fields
}

func (*UpdateableAdapter) RegisterComponent

func (a *UpdateableAdapter) RegisterComponent(update UpdateChan)

func (*UpdateableAdapter) UpdateComponent

func (a *UpdateableAdapter) UpdateComponent()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL