Fudge Core
    Preparing search index...

    Class ProjectAbstract

    Static class handling the resources used with the current FUDGE-instance.
    Keeps a list of the resources and generates ids to retrieve them.
    Resources are objects referenced multiple times but supposed to be stored only once

    Hierarchy (View Summary)

    Index

    Properties

    baseURL: URL = ...
    graphInstancesToResync: GraphInstancesToResync = {}
    mode: MODE = MODE.RUNTIME
    resources: Resources = {}
    scriptNamespaces: ScriptNamespaces = {}
    serialization: SerializationOfResources = {}

    Methods

    • Add an event listener to targetStatic.

      Parameters

      • _type: string
      • _handler: EventListener
      • Optional_options: boolean | AddEventListenerOptions

      Returns void

    • Loads a script from the given URL and integrates it into a HTMLScriptElement in the document.head

      Parameters

      • _url: RequestInfo

      Returns Promise<void>

    • Registers the resource and generates an id for it by default.
      If the resource already has an id, thus having been registered, its deleted from the list and registered anew. It's possible to pass an id, but should not be done except by the Serializer.

      Parameters

      Returns void

    • Creates and registers a resource from a Node, copying the complete graph starting with it

      Parameters

      • _node: Node

        A node to create the resource from

      • _replaceWithInstance: boolean = true

        if true (default), the node used as origin is replaced by a GraphInstance of the Graph created

      Returns Promise<Graph>

    • Register the given namespace to the list of script-namespaces.

      Parameters

      • _namespace: Object

      Returns void

    • Remove an event listener from targetStatic.

      Parameters

      • _type: string
      • _handler: EventListener
      • Optional_options: boolean | AddEventListenerOptions

      Returns void