Skip to content

isRaw is undefined when calling utils.appendChild #9

Open
@pgoldrbx

Description

@pgoldrbx

Original comments: #5 (comment)

Calling utils.appendChild with a raw element throws an error.

const html = require('jsonml.js/lib/html');
const utils = require('jsonml.js/lib/utils');

const jml = ['div']
const rawEl = html.raw('foo');
utils.appendChild(jml, rawEl); // TypeError: exports.isRaw is not a function

Indeed, exports.isRaw is not defined within utils.js. It is, however, defined within html.js. So, the fix should be fairly straightforward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions