Skip to content

Commit

Permalink
$mol_text: relative base support
Browse files Browse the repository at this point in the history
  • Loading branch information
jin committed Jan 5, 2024
1 parent 7203c87 commit 5ca0d63
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion text/text/text.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ namespace $.$$ {
return $mol_dom_context.document.location.href
}

@ $mol_mem
uri_base_abs() {
return new URL( this.uri_base() , $mol_dom_context.document.location.href )
}

@ $mol_mem_key
uri_resolve( uri: string ) {

Expand All @@ -172,7 +177,7 @@ namespace $.$$ {

try {

const url = new URL( uri , this.uri_base() )
const url = new URL( uri , this.uri_base_abs() )
return url.toString()

} catch( error ) {
Expand Down

0 comments on commit 5ca0d63

Please sign in to comment.