diff options
Diffstat (limited to 'src/elements/A.js')
-rw-r--r-- | src/elements/A.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/elements/A.js b/src/elements/A.js index a0d7311..722deed 100644 --- a/src/elements/A.js +++ b/src/elements/A.js @@ -1,4 +1,4 @@ -import { nodeOrNew, register } from '../utils/adopter.js' +import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js' import { registerMethods } from '../utils/methods.js' import { xlink } from '../modules/core/namespaces.js' import Container from './Container.js' @@ -22,9 +22,9 @@ export default class A extends Container { registerMethods({ Container: { // Create a hyperlink element - link: function (url) { + link: wrapWithAttrCheck(function (url) { return this.put(new A()).to(url) - } + }) }, Element: { // Create a hyperlink element |