Skip to content

Support loading parts of pages from a separate html file #20

@shortercode

Description

@shortercode

For static page chunks plain html is often faster to write than long Doom.create calls, so it would be useful to be able to load parts of pages into an element from another html file simply. Proposed method:

var element = Doom.create({
  tagName: "header",
  partial: "headers/home.html"
});

Doom.modify({
  element: element,
  partial: "headers/bio.html"
});

For maintaining state each element will keep a cache of it's content and restore it if the same partial is navigated back to, an optional parameter called partialNoCache will disable this feature for that element.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions